1 | <?php |
||
18 | class Listener |
||
19 | { |
||
20 | protected $capture = false; |
||
21 | protected $eventName = ''; |
||
22 | protected $id = null; |
||
23 | protected $eventStack = null; |
||
24 | |||
25 | /** |
||
26 | * @param string $eventName The name of the event |
||
27 | * @param int $id The id of this listener. This is unique for this eventStack. |
||
28 | * @param string $path Optional. The path listened on, defaults to '/' |
||
|
|||
29 | * @param bool $capture Optional. True for capture phase listeners, default is false. |
||
30 | * @param Stack $eventStack Optional. The eventStack the listener is registered on. Must be set |
||
31 | * for remove() to work. |
||
32 | */ |
||
33 | 12 | public function __construct($eventName, $id, $capture = false, $eventStack = null) |
|
40 | |||
41 | /** |
||
42 | * This method removes this listener from the eventStack. If a matching event is fired later, |
||
43 | * the corresponding listener callback will no longer be called. |
||
44 | */ |
||
45 | 12 | public function remove() |
|
51 | |||
52 | /* |
||
53 | * This allows you to chain listeners and cd() calls on the eventtree. |
||
54 | */ |
||
55 | public function __call($method, $args) |
||
59 | |||
60 | /* TODO: add an add() method, which re-adds the listener, potentially as last in the list */ |
||
61 | } |
||
62 |
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.