We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15f7026 commit 9b76e1bCopy full SHA for 9b76e1b
src/ValueObject/Route.php
@@ -7,7 +7,7 @@ class Route
7
private string $name;
8
private ?array $parameters;
9
10
- public function __construct(string $name, ?array $parameters)
+ public function __construct(string $name, ?array $parameters = null)
11
{
12
$this->name = $name;
13
$this->parameters = $parameters;
@@ -25,6 +25,10 @@ public function getParameters(): ?array
25
26
public function addParameters(array $parameters): void
27
28
+ if ($this->parameters === null) {
29
+ $this->parameters = $parameters;
30
+ }
31
+
32
$this->parameters = array_merge($this->parameters, $parameters);
33
}
34
0 commit comments