Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
5 | final class PathPart |
||
6 | { |
||
7 | /** @var string */ |
||
8 | private $path; |
||
9 | |||
10 | /** @var int */ |
||
11 | private $priority; |
||
12 | |||
13 | /** @var string[] */ |
||
14 | private $substitutions; |
||
15 | |||
16 | /** |
||
17 | * @param array $config |
||
18 | */ |
||
19 | public function __construct(array $config) |
||
20 | { |
||
21 | $this->path = rtrim($config['path'] ?? '', DIRECTORY_SEPARATOR); |
||
22 | $this->priority = $config['priority'] ?? 0; |
||
23 | $this->substitutions = $config['substitutions'] ?? []; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return string |
||
28 | */ |
||
29 | public function getPath(): string |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return int |
||
36 | */ |
||
37 | public function getPriority(): int |
||
40 | } |
||
41 | } |
||
42 |