File tree Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Http \HttplugBundle \Collector ;
4
4
5
- use Symfony \Component \HttpKernel \Kernel ;
6
5
use Symfony \Component \HttpFoundation \Request ;
7
6
use Symfony \Component \HttpFoundation \Response ;
8
7
use Symfony \Component \HttpKernel \DataCollector \DataCollector ;
9
- use Throwable ;
10
8
11
9
/**
12
10
* The Collector hold profiled Stacks pushed by StackPlugin. It also have a list of configured clients.
19
17
*
20
18
* @internal
21
19
*/
22
- // Make this class non-abstract and move collect into it when we drop support for Symfony 4.
23
- abstract class BaseCollector extends DataCollector
20
+ class Collector extends DataCollector
24
21
{
25
22
/**
26
23
* @var Stack|null
@@ -192,28 +189,12 @@ public function getTotalDuration()
192
189
return $ carry + $ stack ->getDuration ();
193
190
}, 0 );
194
191
}
195
- }
196
192
197
- if (Kernel::MAJOR_VERSION >= 5 ) {
198
- class Collector extends BaseCollector
199
- {
200
- /**
201
- * {@inheritdoc}
202
- */
203
- public function collect (Request $ request , Response $ response , Throwable $ exception = null )
204
- {
205
- // We do not need to collect any data from the Symfony Request and Response
206
- }
207
- }
208
- } else {
209
- class Collector extends BaseCollector
193
+ /**
194
+ * {@inheritdoc}
195
+ */
196
+ public function collect (Request $ request , Response $ response , $ exception = null )
210
197
{
211
- /**
212
- * {@inheritdoc}
213
- */
214
- public function collect (Request $ request , Response $ response , \Exception $ exception = null )
215
- {
216
- // We do not need to collect any data from the Symfony Request and Response
217
- }
198
+ // We do not need to collect any data from the Symfony Request and Response
218
199
}
219
200
}
You can’t perform that action at this time.
0 commit comments