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 22
33namespace Http \HttplugBundle \Collector ;
44
5- use Symfony \Component \HttpKernel \Kernel ;
65use Symfony \Component \HttpFoundation \Request ;
76use Symfony \Component \HttpFoundation \Response ;
87use Symfony \Component \HttpKernel \DataCollector \DataCollector ;
9- use Throwable ;
108
119/**
1210 * The Collector hold profiled Stacks pushed by StackPlugin. It also have a list of configured clients.
1917 *
2018 * @internal
2119 */
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
2421{
2522 /**
2623 * @var Stack|null
@@ -192,28 +189,12 @@ public function getTotalDuration()
192189 return $ carry + $ stack ->getDuration ();
193190 }, 0 );
194191 }
195- }
196192
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 )
210197 {
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
218199 }
219200}
You can’t perform that action at this time.
0 commit comments