10000 [Routing] add missing types by nicolas-grekas · Pull Request #41898 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Routing] add missing types #41898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/Loader/ClosureLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function load(mixed $closure, string $type = null)
/**
* {@inheritdoc}
*/
public function supports($resource, string $type = null)
public function supports(mixed $resource, string $type = null)
{
return $resource instanceof \Closure && (!$type || 'closure' === $type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RouteConfigurator

protected $parentConfigurator;

public function __construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)
public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)
{
$this->collection = $collection;
$this->route = $route;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/Loader/ContainerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $container, string $env = null)
/**
* {@inheritdoc}
*/
public function supports($resource, string $type = null)
public function supports(mixed $resource, string $type = null)
{
return 'service' === $type && \is_string($resource);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ private function indent(string $code, int $level = 1): string
/**
* @internal
*/
public static function export($value): string
public static function export(mixed $value): string
{
if (null === $value) {
return 'null';
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Route implements \Serializable
* @param string|string[] $methods A required HTTP method or an array of restricted methods
* @param string|null $condition A condition that should evaluate to true for the route to match
*/
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '')
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', string|array $schemes = [], string|array $methods = [], ?string $condition = '')
{
$this->setPath($path);
$this->addDefaults($defaults);
Expand Down
0