Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class HookAdminBlock extends HookEvent implements HookAdminBlockEventInterface |
||
16 | { |
||
17 | /** |
||
18 | * Constructor. |
||
19 | */ |
||
20 | protected function __construct() |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Notify Hook observers for Admin Block event. |
||
27 | * |
||
28 | * @param int $type Set the type of hook event called. |
||
29 | * 0: HOOK_EVENT_TYPE_PRE, 1: HOOK_EVENT_TYPE_POST |
||
30 | * |
||
31 | * @return array|int |
||
32 | */ |
||
33 | public function notifyAdminBlock($type) |
||
54 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: