1 | <?php |
||
15 | class Dispatcher |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var Map |
||
20 | */ |
||
21 | private $routerMap; |
||
22 | private $routerConfig = []; |
||
23 | private $viewEngineConfig = []; |
||
24 | |||
25 | /** |
||
26 | * @var Request |
||
27 | */ |
||
28 | private $request; |
||
29 | |||
30 | public function setRouterConfig(array $routerConfig) |
||
34 | |||
35 | public function setViewEngineConfig(array $config) |
||
39 | |||
40 | public function setRequest(Request $request) |
||
44 | |||
45 | public function dispatch() |
||
55 | |||
56 | private function buildRouterMap() |
||
63 | |||
64 | /** |
||
65 | * @param Request $request [description] |
||
|
|||
66 | * @param ViewModel $viewModel [description] |
||
67 | * @return ParameterMap |
||
68 | */ |
||
69 | private function getParameterMap(ViewModel $viewModel) |
||
79 | |||
80 | |||
81 | private function execute(ParameterMap $parameterMap) |
||
95 | |||
96 | private function getEventName($action) |
||
105 | |||
106 | /** |
||
107 | * @return Proc |
||
108 | */ |
||
109 | private function getMatchedHandler() |
||
114 | |||
115 | private function triggerEvent($eventName) |
||
121 | |||
122 | private function renderView($controllerResult, ViewModel $viewModel) |
||
132 | |||
133 | /** |
||
134 | * @param mixed $controllerResult |
||
135 | * @return View |
||
136 | */ |
||
137 | private function resolveView($controllerResult) |
||
142 | } |
||
143 |
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.