Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 4 | public function __construct(string $routeItem) |
|
37 | { |
||
38 | 4 | $this->method = 'GET'; |
|
39 | 4 | $this->expr = '/^(*.)$/'; |
|
40 | 4 | $this->slugs = []; |
|
41 | 4 | if (strpos($routeItem, ';') !== false) { |
|
42 | list( |
||
43 | 1 | $this->method, |
|
44 | 1 | $this->expr, |
|
45 | $slugs |
||
46 | 1 | ) = explode(';', $routeItem); |
|
47 | 1 | $this->slugs = $this->parsedSlugs($slugs); |
|
48 | } else { |
||
49 | 4 | $this->expr = $routeItem; |
|
50 | } |
||
97 |