1 | <?php |
||
21 | class LogExtension extends Extension implements EventListenerInterface |
||
22 | { |
||
23 | use LogTrait; |
||
24 | |||
25 | /** |
||
26 | * @var Service |
||
27 | */ |
||
28 | protected $_service; |
||
29 | |||
30 | /** |
||
31 | * @var Action |
||
32 | */ |
||
33 | protected $_action; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $_timer; |
||
39 | |||
40 | /** |
||
41 | * Returns a list of events this object is implementing. When the class is registered |
||
42 | * in an event manager, each individual method will be associated with the respective event. |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function implementedEvents() |
||
53 | |||
54 | /** |
||
55 | * before process |
||
56 | * |
||
57 | * @param Event $event An Event instance. |
||
58 | * @return void |
||
59 | */ |
||
60 | public function beforeProcess(Event $event) |
||
65 | |||
66 | /** |
||
67 | * after process |
||
68 | * |
||
69 | * @param Event $event An Event instance. |
||
70 | * @return void |
||
71 | */ |
||
72 | public function afterProcess(Event $event) |
||
87 | } |
||
88 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.