Total Complexity | 8 |
Total Lines | 90 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | class Path |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $path; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $regex; |
||
19 | |||
20 | /** |
||
21 | * Path constructor. |
||
22 | * @param string $path |
||
23 | * @param array $regex |
||
24 | */ |
||
25 | public function __construct(string $path, array $regex = []) |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getPattern(): string |
||
36 | { |
||
37 | // todo |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getPath(): string |
||
44 | { |
||
45 | return $this->path; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | public function getRegex(): array |
||
52 | { |
||
53 | return $this->regex; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @param self $parent |
||
58 | */ |
||
59 | public function hinge(self $parent): void |
||
65 | ); |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * processing: |
||
70 | * path: '/(<lang:\w+>)' -> '/(<lang>)' |
||
71 | * re: [] -> ['lang' => '\w+'] |
||
72 | * |
||
73 | * if attr exists -> throws |
||
74 | */ |
||
75 | protected function processing(): void |
||
101 |