Added property types to all non-deprecated classes

This commit is contained in:
Alejandro Celaya
2019-12-29 22:48:40 +01:00
parent b904c6d00d
commit a830420d75
66 changed files with 122 additions and 231 deletions

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Rest;
use Closure;
use function Shlinkio\Shlink\Common\loadConfigFromGlob;
use function sprintf;
@@ -11,14 +13,11 @@ class ConfigProvider
{
private const ROUTES_PREFIX = '/rest/v{version:1|2}';
/** @var callable */
private $loadConfig;
private Closure $loadConfig;
public function __construct(?callable $loadConfig = null)
{
$this->loadConfig = $loadConfig ?? function (string $glob) {
return loadConfigFromGlob($glob);
};
$this->loadConfig = Closure::fromCallable($loadConfig ?? fn (string $glob) => loadConfigFromGlob($glob));
}
public function __invoke()