1 | <?php |
||
20 | class LogExtension extends Extension implements EventListenerInterface |
||
21 | { |
||
22 | use LogTrait; |
||
23 | |||
24 | /** |
||
25 | * @var Service |
||
26 | */ |
||
27 | protected $_service; |
||
28 | |||
29 | /** |
||
30 | * @var Action |
||
31 | */ |
||
32 | protected $_action; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $_timer; |
||
38 | |||
39 | /** |
||
40 | * Returns a list of events this object is implementing. When the class is registered |
||
41 | * in an event manager, each individual method will be associated with the respective event. |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | public function implementedEvents() |
||
52 | |||
53 | /** |
||
54 | * before process |
||
55 | * |
||
56 | * @param Event $event An Event instance. |
||
57 | * @return void |
||
58 | */ |
||
59 | public function beforeProcess(Event $event) |
||
64 | |||
65 | /** |
||
66 | * after process |
||
67 | * |
||
68 | * @param Event $event An Event instance. |
||
69 | * @return void |
||
70 | */ |
||
71 | public function afterProcess(Event $event) |
||
86 | } |
||
87 |
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.