Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class Url |
||
12 | { |
||
13 | private Repository $repository; |
||
14 | |||
15 | public function __construct(Repository $repository) |
||
16 | { |
||
17 | $this->repository = $repository; |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Generate (make) URL by name based on the defined routes |
||
22 | * |
||
23 | * @param string $name |
||
24 | * @param string[] $parameters |
||
25 | * @return string |
||
26 | * @throws UndefinedRouteException |
||
27 | */ |
||
28 | public function make(string $name, array $parameters = []): string |
||
42 | } |
||
43 | } |
||
44 |