1 | <?php |
||
23 | abstract class BaseCollector extends DataCollector |
||
24 | { |
||
25 | /** |
||
26 | * @var Stack|null |
||
27 | */ |
||
28 | private $activeStack; |
||
29 | |||
30 | 20 | public function __construct() |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 19 | public function reset() |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 2 | public function getName() |
|
51 | |||
52 | /** |
||
53 | * Mark the stack as active. If a stack was already active, use it as parent for our stack. |
||
54 | * |
||
55 | * @param Stack $stack |
||
56 | */ |
||
57 | 8 | public function activateStack(Stack $stack) |
|
65 | |||
66 | /** |
||
67 | * Mark the stack as inactive. |
||
68 | * |
||
69 | * @param Stack $stack |
||
70 | */ |
||
71 | 6 | public function deactivateStack(Stack $stack) |
|
75 | |||
76 | /** |
||
77 | * @return Stack|null |
||
78 | */ |
||
79 | 8 | public function getActiveStack() |
|
83 | |||
84 | /** |
||
85 | * @param Stack $stack |
||
86 | */ |
||
87 | 7 | public function addStack(Stack $stack) |
|
91 | |||
92 | /** |
||
93 | * @param Stack $parent |
||
94 | * |
||
95 | * @return Stack[] |
||
96 | */ |
||
97 | public function getChildrenStacks(Stack $parent) |
||
103 | |||
104 | /** |
||
105 | * @return Stack[] |
||
106 | */ |
||
107 | 5 | public function getStacks() |
|
111 | |||
112 | /** |
||
113 | * @return Stack[] |
||
114 | */ |
||
115 | public function getSuccessfulStacks() |
||
121 | |||
122 | /** |
||
123 | * @return Stack[] |
||
124 | */ |
||
125 | 1 | public function getFailedStacks() |
|
131 | |||
132 | /** |
||
133 | * @return array |
||
134 | */ |
||
135 | 3 | public function getClients() |
|
145 | |||
146 | /** |
||
147 | * @param $client |
||
148 | * |
||
149 | * @return Stack[] |
||
150 | */ |
||
151 | 1 | public function getClientRootStacks($client) |
|
157 | |||
158 | /** |
||
159 | * Count all messages for a client. |
||
160 | * |
||
161 | * @param $client |
||
162 | * |
||
163 | * @return int |
||
164 | */ |
||
165 | public function countClientMessages($client) |
||
171 | |||
172 | /** |
||
173 | * Recursively count message in stack. |
||
174 | * |
||
175 | * @param Stack $stack |
||
176 | * |
||
177 | * @return int |
||
178 | */ |
||
179 | private function countStackMessages(Stack $stack) |
||
185 | |||
186 | /** |
||
187 | * @return int |
||
188 | */ |
||
189 | public function getTotalDuration() |
||
195 | } |
||
196 | |||
220 |
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: