GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

DataCollectorSymfonyCompatibilityTrait::collect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
3
namespace EightPoints\Bundle\GuzzleBundle\DataCollector;
4
5
use Symfony\Component\HttpFoundation\Request;
6
use Symfony\Component\HttpFoundation\Response;
7
use Symfony\Component\HttpKernel\Kernel;
8
9
/**
10
 * @TODO remove this trait with dropping of support Symfony < 4.4
11
 */
12
13
if (Kernel::VERSION_ID >= 40308) {
14
    trait DataCollectorSymfonyCompatibilityTrait
15
    {
16
        abstract protected function doCollect(Request $request, Response $response, \Throwable $exception = null);
17
18
        /**
19
         * @param Request $request
20
         * @param Response $response
21
         * @param \Throwable|null $exception
22
         */
23
        public function collect(Request $request, Response $response, \Throwable $exception = null)
24
        {
25
            $this->doCollect($request, $response, $exception);
26
        }
27
    }
28
} else {
29
    trait DataCollectorSymfonyCompatibilityTrait
30
    {
31
        abstract protected function doCollect(Request $request, Response $response, \Throwable $exception = null);
32
33
        /**
34
         * @param Request $request
35
         * @param Response $response
36
         * @param \Exception|null $exception
37
         */
38
        public function collect(Request $request, Response $response, \Exception $exception = null)
39
        {
40
            $this->doCollect($request, $response, $exception);
41
        }
42
    }
43
}
44