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.
Passed
Pull Request — master (#280)
by Vlad
01:45
created

DataCollectorSymfonyCompatibilityTrait::collect()   A

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
if (Kernel::VERSION_ID >= 40308) {
10
    trait DataCollectorSymfonyCompatibilityTrait
11
    {
12
        abstract protected function doCollect(Request $request, Response $response, \Throwable $exception = null);
13
14
        /**
15
         * @param Request $request
16
         * @param Response $response
17
         * @param \Throwable|null $exception
18
         */
19
        public function collect(Request $request, Response $response, \Throwable $exception = null)
20
        {
21
            $this->doCollect($request, $response, $exception);
22
        }
23
    }
24
} else {
25
    trait DataCollectorSymfonyCompatibilityTrait
26
    {
27
        abstract protected function doCollect(Request $request, Response $response, \Throwable $exception = null);
28
29
        /**
30
         * @param Request $request
31
         * @param Response $response
32
         * @param \Exception|null $exception
33
         */
34
        public function collect(Request $request, Response $response, \Exception $exception = null)
35
        {
36
            $this->doCollect($request, $response, $exception);
37
        }
38
    }
39
}