1 | <?php |
||
9 | class CRouterBasic implements \Anax\DI\IInjectionAware |
||
10 | { |
||
11 | use \Anax\DI\TInjectionAware; |
||
12 | |||
13 | |||
14 | |||
15 | /** |
||
16 | * Properties |
||
17 | * |
||
18 | */ |
||
19 | private $routes; // All the routes |
||
20 | private $internalRoutes; // All internal routes |
||
21 | private $defaultRoute = null; // A default rout to catch all |
||
22 | |||
23 | |||
24 | |||
25 | /** |
||
26 | * Add a route to the router. |
||
27 | * |
||
28 | * @param string $rule for this route |
||
29 | * @param mixed $action null, string or callable to implement a controller for the route |
||
30 | * |
||
31 | * @return class as new route |
||
32 | */ |
||
33 | public function add($rule, $action = null) |
||
46 | |||
47 | |||
48 | |||
49 | /** |
||
50 | * Add an internal (not exposed to url-matching) route to the router. |
||
51 | * |
||
52 | * @param string $rule for this route |
||
53 | * @param mixed $action null, string or callable to implement a controller for the route |
||
54 | * |
||
55 | * @return class as new route |
||
56 | */ |
||
57 | public function addInternal($rule, $action = null) |
||
64 | |||
65 | |||
66 | |||
67 | /** |
||
68 | * Add an internal (not exposed to url-matching) route to the router. |
||
69 | * |
||
70 | * @param string $rule for this route |
||
71 | * @param mixed $action null, string or callable to implement a controller for the route |
||
|
|||
72 | * |
||
73 | * @return class as new route |
||
74 | */ |
||
75 | public function handleInternal($rule) |
||
84 | |||
85 | |||
86 | |||
87 | /** |
||
88 | * Handle the routes and match them towards the request, dispatch them when a match is made. |
||
89 | * |
||
90 | * @return $this |
||
91 | */ |
||
92 | public function handle() |
||
150 | } |
||
151 |
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.