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

Skip to content

Commit 6e81be1

Browse files
committed
rename alias to aliases and add phpdoc
1 parent abf4cf2 commit 6e81be1

File tree

1 file changed

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

1 file changed

+9
-7
lines changed

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

+9-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class Route
2020
{
2121
private ?string $path = null;
2222
private array $localizedPaths = [];
23-
private array $methods;
24-
private array $schemes;
2523

2624
/**
2725
* @param string|array<string,string>|null $path The route path (i.e. "/user/login")
@@ -39,14 +37,14 @@ class Route
3937
* @param bool|null $utf8 Whether the route accepts UTF-8 in its parameters
4038
* @param bool|null $stateless Whether the route is defined as stateless or stateful, @see https://symfony.com/doc/current/routing.html#stateless-routes
4139
* @param string|null $env The env in which the route is defined (i.e. "dev", "test", "prod")
40+
* @param string[] $aliases The list of aliases for this route
4241
*/
4342
public function __construct(
4443
string|array|null $path = null,
4544
private ?string $name = null,
4645
private array $requirements = [],
4746
private array $options = [],
4847
private array $defaults = [],
49-
private array $alias = [],
5048
private ?string $host = null,
5149
array|string $methods = [],
5250
array|string $schemes = [],
@@ -57,6 +55,7 @@ public function __construct(
5755
?bool $utf8 = null,
5856
?bool $stateless = null,
5957
private ?string $env = null,
58+
private array $aliases = [],
6059
) {
6160
if (\is_array($path)) {
6261
$this->localizedPaths = $path;
@@ -65,7 +64,7 @@ public function __construct(
6564
}
6665
$this->setMethods($methods);
6766
$this->setSchemes($schemes);
68-
$this->setAliases($alias);
67+
$this->setAliases($aliases);
6968
if (null !== $locale) {
7069
$this->defaults['_locale'] = $locale;
7170
}
@@ -82,6 +81,9 @@ public function __construct(
8281
$this->defaults['_stateless'] = $stateless;
8382
}
8483
}
84+
private array $methods;
85+
86+
private array $schemes;
8587

8688
public function setPath(string $path): void
8789
{
@@ -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