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) { |
||
40 | |||
41 | /** |
||
42 | * @param Request $request |
||
43 | * @param Response $response |
||
44 | * @param \Exception $exception |
||
45 | */ |
||
46 | public function collect(Request $request, Response $response, \Exception $exception = null) { |
||
53 | |||
54 | public function reset() { |
||
57 | |||
58 | /** |
||
59 | * Return total duration in seconds. |
||
60 | * |
||
61 | * @return float |
||
62 | */ |
||
63 | public function getTime() { |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getCalls() { |
||
85 | |||
86 | /** |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getCallCount() { |
||
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | public function getInvalidEntityCount() { |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getName() { |
||
106 | |||
107 | } |
||
108 |
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.