1 | <?php |
||
14 | class Parsed |
||
15 | { |
||
16 | /** |
||
17 | * Instance of original route |
||
18 | * |
||
19 | * @var \Kambo\Router\Route\Route |
||
20 | */ |
||
21 | private $route; |
||
22 | |||
23 | /** |
||
24 | * Route placeholders from route. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private $placeholders; |
||
29 | |||
30 | /** |
||
31 | * Route parameters from request |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | private $parameters; |
||
36 | |||
37 | /** |
||
38 | * ParsedRoute constructor |
||
39 | * |
||
40 | * @param \Kambo\Router\Route\Route $route |
||
41 | */ |
||
42 | public function __construct(/*Route*/ $route) |
||
46 | |||
47 | /** |
||
48 | * Magic method for proxing methods call to parent object. |
||
49 | * |
||
50 | * @param string $name Method name |
||
51 | * @param array $arguments The parameters to be passed to the method, |
||
52 | * as an indexed array. |
||
53 | */ |
||
54 | public function __call($name, array $arguments) |
||
58 | |||
59 | /** |
||
60 | * Get route method |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getMethod() |
||
68 | |||
69 | /** |
||
70 | * Get handler |
||
71 | * |
||
72 | * @return mixed |
||
73 | */ |
||
74 | public function getHandler() |
||
78 | |||
79 | /** |
||
80 | * Sets placeholders extracted from route. |
||
81 | * |
||
82 | * @param mixed $parameters |
||
|
|||
83 | * |
||
84 | * @return self for fluent interface |
||
85 | */ |
||
86 | public function setPlaceholders($placeholders) |
||
92 | |||
93 | /** |
||
94 | * Get placeholders extracted from route. |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | public function getPlaceholders() |
||
102 | |||
103 | /** |
||
104 | * Sets parameters for route from request. |
||
105 | * |
||
106 | * @param mixed $parameters |
||
107 | * |
||
108 | * @return self for fluent interface |
||
109 | */ |
||
110 | public function setParameters($parameters) |
||
116 | |||
117 | /** |
||
118 | * Get parameters of route from request. |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | public function getParameters() |
||
126 | } |
||
127 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.