Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 4 | public function __construct(string $routeItem) |
|
18 | { |
||
19 | 4 | $this->method = 'GET'; |
|
20 | 4 | $this->expr = '/^(*.)$/'; |
|
21 | $this->callable = function () { |
||
22 | }; |
||
23 | 4 | if (strpos($routeItem, ';') !== false) { |
|
24 | list( |
||
25 | 1 | $this->method, |
|
26 | 1 | $this->expr, |
|
27 | 1 | $this->callable |
|
28 | 1 | ) = explode(';', $routeItem); |
|
29 | } else { |
||
30 | 4 | $this->expr = $routeItem; |
|
31 | } |
||
54 |