8000 rename alias to aliases and add phpdoc · symfony/symfony@749c442 · GitHub
[go: up one dir, main page]

Skip to content

Commit 749c442

Browse files
committed
rename alias to aliases and add phpdoc
1 parent abf4cf2 commit 749c442

File tree

1 file changed

+7
-5
lines changed
  • src/Symfony/Component/Routing/Attribute

1 file changed

+7
-5
lines changed

src/Symfony/Component/Routing/Attribute/Route.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ class Route
3939
* @param bool|null $utf8 Whether the route accepts UTF-8 in its parameters
4040
* @param bool|null $stateless Whether the route is defined as stateless or stateful, @see https://symfony.com/doc/current/routing.html#stateless-routes
4141
* @param string|null $env The env in which the route is defined (i.e. "dev", "test", "prod")
42+
* @param string[] $aliases The list of aliases for this route
4243
*/
4344
public function __construct(
4445
string|array|null $path = null,
4546
private ?string $name = null,
4647
private array $requirements = [],
4748
private array $options = [],
4849
private array $defaults = [],
49-
private array $alias = [],
5050
private ?string $host = null,
5151
array|string $methods = [],
5252
array|string $schemes = [],
@@ -57,6 +57,7 @@ public function __construct(
5757
?bool $utf8 = null,
5858
?bool $stateless = null,
5959
private ?string $env = null,
60+
private array $aliases = [],
6061
) {
6162
if (\is_array($path)) {
6263
$this->localizedPaths = $path;
@@ -65,7 +66,8 @@ public function __construct(
6566
}
6667
$this->setMethods($methods);
6768
$this->setSchemes($schemes);
68-
$this->setAliases($alias);
69+
$this->setAliases($aliases);
70+
6971
if (null !== $locale) {
7072
$this->defaults['_locale'] = $locale;
7173
}
@@ -205,12 +207,12 @@ public function getEnv(): ?string
205207

206208
public function getAliases(): array
207209
{
208-
return $this->alias;
210+
return $this->aliases;
209211
}
210212

211-
public function setAliases(array $alias): void
213+
public function setAliases(array $aliases): void
212214
{
213-
$this->alias = $alias;
215+
$this->aliases = $aliases;
214216
}
215217
}
216218

0 commit comments

Comments
 (0)
0