Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
23 | 5 | public function getListenersForEvent($event) |
|
24 | { |
||
25 | 5 | $result = []; |
|
26 | |||
27 | 5 | foreach ($this->eventListeners as $eventListener) { |
|
28 | 1 | $methodName = $this->getMethodName($event); |
|
29 | |||
30 | 1 | $method = [$eventListener, $methodName]; |
|
31 | |||
32 | 1 | if (is_callable($method)) { |
|
33 | 1 | $result[] = $method; |
|
34 | } |
||
35 | } |
||
36 | |||
37 | 5 | return $result; |
|
38 | } |
||
39 | |||
47 | } |