| 1 | <?php |
||
| 7 | class Route |
||
| 8 | { |
||
| 9 | use MiddlewaresTrait; |
||
| 10 | |||
| 11 | /** @var string */ |
||
| 12 | protected $path; |
||
| 13 | /** @var callable */ |
||
| 14 | protected $endPoint; |
||
| 15 | /** @var array */ |
||
| 16 | protected $methods = []; |
||
| 17 | /** @var array */ |
||
| 18 | protected $restrictions = []; |
||
| 19 | /** @var array */ |
||
| 20 | protected $matches = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $path |
||
| 24 | * @param callable $handler |
||
| 25 | */ |
||
| 26 | 34 | public function __construct(string $path, callable $handler) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param RequestInterface $request |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | 16 | public function __invoke(RequestInterface $request) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return EndPoint |
||
| 47 | */ |
||
| 48 | 7 | public function getEndPoint() : EndPoint |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param array $restrictions |
||
| 55 | * @return $this |
||
| 56 | */ |
||
| 57 | 2 | public function setRestrictions(array $restrictions) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @return array |
||
| 65 | */ |
||
| 66 | 12 | public function getRestrictions() : array |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | 12 | public function getPath() : string |
|
| 78 | |||
| 79 | /** |
||
| 80 | * @param array $values |
||
| 81 | * @return $this |
||
| 82 | */ |
||
| 83 | 8 | public function setMatches(array $values = []) |
|
| 88 | |||
| 89 | /** |
||
| 90 | * @return array |
||
| 91 | */ |
||
| 92 | 7 | public function getMatches() : array |
|
| 96 | |||
| 97 | /** |
||
| 98 | * @return array |
||
| 99 | */ |
||
| 100 | 1 | public function getMethods() : array |
|
| 104 | |||
| 105 | /** |
||
| 106 | * @param array $methods |
||
| 107 | * @return $this |
||
| 108 | */ |
||
| 109 | 1 | public function setMethods(array $methods) |
|
| 114 | } |
||
| 115 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.