1 | <?php |
||
20 | class Collector extends DataCollector |
||
21 | { |
||
22 | /** |
||
23 | * @var Stack|null |
||
24 | */ |
||
25 | private $activeStack; |
||
26 | |||
27 | 20 | public function __construct() |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 19 | public function reset() |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 2 | public function getName() |
|
48 | |||
49 | /** |
||
50 | * Mark the stack as active. If a stack was already active, use it as parent for our stack. |
||
51 | * |
||
52 | * @param Stack $stack |
||
53 | */ |
||
54 | 8 | public function activateStack(Stack $stack) |
|
62 | |||
63 | /** |
||
64 | * Mark the stack as inactive. |
||
65 | * |
||
66 | * @param Stack $stack |
||
67 | */ |
||
68 | 6 | public function deactivateStack(Stack $stack) |
|
72 | |||
73 | /** |
||
74 | * @return Stack|null |
||
75 | */ |
||
76 | 8 | public function getActiveStack() |
|
80 | |||
81 | /** |
||
82 | * @param Stack $stack |
||
83 | */ |
||
84 | 7 | public function addStack(Stack $stack) |
|
88 | |||
89 | /** |
||
90 | * @param Stack $parent |
||
91 | * |
||
92 | * @return Stack[] |
||
93 | */ |
||
94 | public function getChildrenStacks(Stack $parent) |
||
100 | |||
101 | /** |
||
102 | * @return Stack[] |
||
103 | */ |
||
104 | 5 | public function getStacks() |
|
108 | |||
109 | /** |
||
110 | * @return Stack[] |
||
111 | */ |
||
112 | public function getSuccessfulStacks() |
||
118 | |||
119 | /** |
||
120 | * @return Stack[] |
||
121 | */ |
||
122 | 1 | public function getFailedStacks() |
|
128 | |||
129 | /** |
||
130 | * @return array |
||
131 | */ |
||
132 | 3 | public function getClients() |
|
142 | |||
143 | /** |
||
144 | * @param $client |
||
145 | * |
||
146 | * @return Stack[] |
||
147 | */ |
||
148 | 1 | public function getClientRootStacks($client) |
|
154 | |||
155 | /** |
||
156 | * Count all messages for a client. |
||
157 | * |
||
158 | * @param $client |
||
159 | * |
||
160 | * @return int |
||
161 | */ |
||
162 | public function countClientMessages($client) |
||
168 | |||
169 | /** |
||
170 | * Recursively count message in stack. |
||
171 | * |
||
172 | * @param Stack $stack |
||
173 | * |
||
174 | * @return int |
||
175 | */ |
||
176 | private function countStackMessages(Stack $stack) |
||
182 | |||
183 | /** |
||
184 | * @return int |
||
185 | */ |
||
186 | public function getTotalDuration() |
||
192 | |||
193 | /** |
||
194 | * {@inheritdoc} |
||
195 | */ |
||
196 | 1 | public function collect(Request $request, Response $response, $exception = null) |
|
200 | } |
||
201 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: