| Total Complexity | 7 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 78.56% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | abstract class Route implements RouteAnnotationInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var mixed|string |
||
| 15 | * @psalm-suppress PropertyNotSetInConstructor |
||
| 16 | */ |
||
| 17 | protected string $route; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var array |
||
| 21 | * @psalm-suppress PropertyNotSetInConstructor |
||
| 22 | */ |
||
| 23 | protected array $methods; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | * @psalm-suppress PropertyNotSetInConstructor |
||
| 28 | */ |
||
| 29 | protected array $middlewares; |
||
| 30 | |||
| 31 | 1 | public function __construct(array $values) |
|
| 32 | { |
||
| 33 | 1 | if (isset($values['value'])) { |
|
| 34 | 1 | $this->route = $values['value']; |
|
| 35 | } |
||
| 36 | 1 | if (isset($values['middlewares'])) { |
|
| 37 | $this->middlewares = $values['middlewares']; |
||
| 38 | } |
||
| 39 | 1 | if (isset($values['methods'])) { |
|
| 40 | 1 | $this->methods = $values['methods']; |
|
| 41 | } |
||
| 42 | 1 | } |
|
| 43 | |||
| 44 | 1 | public function getRoute(): string |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | public function getMethods(): array |
|
| 52 | } |
||
| 53 | |||
| 54 | public function getMiddlewares(): array |
||
| 57 | } |
||
| 58 | } |
||
| 59 |