Skip to content

Commit

Permalink
rector
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 24, 2025
1 parent 9202926 commit 5cca882
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 3.1.1 under development

- Enh #154: Add `UrlGenerator` host and scheme properties to package config params (@ev-gor)
- Chg #157: Bump minimal PHP version to 8.1 (@vjik)
- Chg #157: Bump minimal PHP version to 8.1 and minor refactoring (@vjik)

## 3.1.0 March 19, 2024

Expand Down
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;

return RectorConfig::configure()
Expand All @@ -19,6 +18,5 @@
])
->withSkip([
ClosureToArrowFunctionRector::class,
ReadOnlyPropertyRector::class,
NullToStrictStringFuncCallArgRector::class,
]);
12 changes: 6 additions & 6 deletions src/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ final class UrlGenerator implements UrlGeneratorInterface
private string $uriPrefix = '';

/**
* @var array<string,string>
* @psalm-var array<string,string>
*/
private array $defaultArguments = [];
private bool $encodeRaw = true;
private RouteParser $routeParser;
private readonly RouteParser $routeParser;

public function __construct(
private RouteCollectionInterface $routeCollection,
private ?CurrentRoute $currentRoute = null,
private readonly RouteCollectionInterface $routeCollection,
private readonly ?CurrentRoute $currentRoute = null,
?RouteParser $parser = null,
private ?string $scheme = null,
private ?string $host = null,
private readonly ?string $scheme = null,
private readonly ?string $host = null,
) {
$this->routeParser = $parser ?? new RouteParser\Std();
}
Expand Down
6 changes: 3 additions & 3 deletions src/UrlMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class UrlMatcher implements UrlMatcherInterface
*/
private bool $hasCache = false;

private RouteCollector $fastRouteCollector;
private readonly RouteCollector $fastRouteCollector;
private bool $hasInjectedRoutes = false;

/**
Expand All @@ -74,8 +74,8 @@ final class UrlMatcher implements UrlMatcherInterface
* @psalm-param DispatcherCallback|null $dispatcherFactory
*/
public function __construct(
private RouteCollectionInterface $routeCollection,
private ?CacheInterface $cache = null,
private readonly RouteCollectionInterface $routeCollection,
private readonly ?CacheInterface $cache = null,
?array $config = null,
?RouteCollector $fastRouteCollector = null,
?callable $dispatcherFactory = null
Expand Down

0 comments on commit 5cca882

Please sign in to comment.