1 | <?php |
||
10 | class EventListenerCollection implements IteratorAggregate, Countable |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $eventName; |
||
16 | |||
17 | /** |
||
18 | * @var EventListenerInterface[] |
||
19 | */ |
||
20 | private $eventListeners = array(); |
||
21 | |||
22 | /** |
||
23 | * @param string $eventName |
||
24 | */ |
||
25 | public function __construct($eventName) |
||
29 | |||
30 | /** |
||
31 | * @return EventListenerInterface[] |
||
|
|||
32 | */ |
||
33 | public function getIterator() |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getEventName() |
||
45 | |||
46 | /** |
||
47 | * @param EventListenerInterface $eventListener |
||
48 | */ |
||
49 | public function add(EventListenerInterface $eventListener) |
||
63 | |||
64 | /** |
||
65 | * @return int The custom count as an integer. |
||
66 | */ |
||
67 | public function count() |
||
71 | } |
||
72 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.