Completed
Pull Request — master (#11)
by Giso
01:53
created

SoapDataCollector::getRequests()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Freshcells\SoapClientBundle\DataCollector;
4
5
use Symfony\Component\HttpFoundation\Request;
6
use Symfony\Component\HttpFoundation\Response;
7
use Symfony\Component\HttpKernel\Kernel;
8
9
if (Kernel::MAJOR_VERSION >= 5) {
10
    class SoapDataCollector extends AbstractSoapDataCollector
11
    {
12
        /**
13
         * {@inheritdoc}
14
         */
15
        public function collect(Request $request, Response $response, \Throwable $exception = null)
16
        {
17 6
            return $this->doCollect();
18
        }
19 6
    }
20 6
} else {
21
    class SoapDataCollector extends AbstractSoapDataCollector
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Freshcells\SoapClientBun...ector\SoapDataCollector has been defined more than once; this definition is ignored, only the first definition in this file (L10-19) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
22
    {
23
        /**
24
         * {@inheritdoc}
25 6
         */
26
        public function collect(Request $request, Response $response, \Exception $exception = null)
27 6
        {
28 6
            return $this->doCollect();
29 6
        }
30
    }
31
}
32