1 | <?php |
||
27 | class MagentoDataCollector extends DataCollector |
||
28 | { |
||
29 | /** |
||
30 | * @var MagentoLogger |
||
31 | */ |
||
32 | protected $logger; |
||
33 | |||
34 | /** |
||
35 | * @param LoggerInterface $logger |
||
36 | */ |
||
37 | public function __construct(LoggerInterface $logger) |
||
41 | |||
42 | /** |
||
43 | * @param Request $request |
||
44 | * @param Response $response |
||
45 | * @param \Exception $exception |
||
46 | */ |
||
47 | public function collect(Request $request, Response $response, \Exception $exception = null) |
||
55 | |||
56 | /** |
||
57 | * Return total duration in seconds. |
||
58 | * |
||
59 | * @return float |
||
60 | */ |
||
61 | public function getTime() |
||
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | public function getCalls() |
||
85 | |||
86 | /** |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getCallCount() |
||
93 | |||
94 | /** |
||
95 | * @return int |
||
96 | */ |
||
97 | public function getInvalidEntityCount() |
||
101 | |||
102 | /** |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getName() |
||
109 | |||
110 | /** |
||
111 | * |
||
112 | */ |
||
113 | public function reset() { |
||
116 | } |
||
117 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.