8000 minor #41898 [Routing] add missing types (nicolas-grekas) · symfony/symfony@d0c7287 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0c7287

Browse files
minor #41898 [Routing] add missing types (nicolas-grekas)
This PR was merged into the 6.0 branch. Discussion ---------- [Routing] add missing types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Related to #41424 Commits ------- 4f22b09 [Routing] add missing types
2 parents 57b9a62 + 4f22b09 commit d0c7287

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Symfony/Component/Routing/Loader/ClosureLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function load(mixed $closure, string $type = null)
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
public function supports($resource, string $type = null)
39+
public function supports(mixed $resource, string $type = null)
4040
{
4141
return $resource instanceof \Closure && (!$type || 'closure' === $type);
4242
}

src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RouteConfigurator
2424

2525
protected $parentConfigurator;
2626

27-
public function __construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)
27+
public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)
2828
{
2929
$this->collection = $collection;
3030
$this->route = $route;

src/Symfony/Component/Routing/Loader/ContainerLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(ContainerInterface $container, string $env = null)
3131
/**
3232
* {@inheritdoc}
3333
*/
34-
public function supports($resource, string $type = null)
34+
public function supports(mixed $resource, string $type = null)
3535
{
3636
return 'service' === $type && \is_string($resource);
3737
}

src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ private function indent(string $code, int $level = 1): string
463463
/**
464464
* @internal
465465
*/
466-
public static function export($value): string
466+
public static function export(mixed $value): string
467467
{
468468
if (null === $value) {
469469
return 'null';

src/Symfony/Component/Routing/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Route implements \Serializable
5050
* @param string|string[] $methods A required HTTP method or an array of restricted methods
5151
* @param string|null $condition A condition that should evaluate to true for the route to match
5252
*/
53-
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '')
53+
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', string|array $schemes = [], string|array $methods = [], ?string $condition = '')
5454
{
5555
$this->setPath($path);
5656
$this->addDefaults($defaults);

0 commit comments

Comments
 (0)
0