| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Route |
||
| 6 | { |
||
| 7 | |||
| 8 | protected $method; |
||
| 9 | protected $expr; |
||
| 10 | protected $callable; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * instanciate |
||
| 14 | * |
||
| 15 | * @param string $routeItem |
||
| 16 | */ |
||
| 17 | public function __construct(string $routeItem) |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * return regexp pattern |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | public function getExpr(): string |
||
| 40 | { |
||
| 41 | return $this->expr; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * return required request method |
||
| 46 | * |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | public function getMethod(): string |
||
| 50 | { |
||
| 51 | return $this->method; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * return a nonsense |
||
| 56 | * @todo refacto this as a pattern group replacer to get params slugs |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getCallable(): string |
||
| 63 | } |
||
| 64 | } |
||
| 65 |