SoapDataCollector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 11
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A collect() 0 4 1
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
// @codingStandardsIgnoreStart
10 3
if (Kernel::MAJOR_VERSION >= 5) {
11
    class SoapDataCollector extends AbstractSoapDataCollector
12
    {
13
// @codingStandardsIgnoreEnd
14
        /**
15
         * {@inheritdoc}
16
         */
17
        public function collect(Request $request, Response $response, \Throwable $exception = null)
18
        {
19 3
            return $this->doCollect();
20
        }
21
    }
22
} else {
23
// @codingStandardsIgnoreStart
24
    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 (L11-21) 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...
25
    {
26
// @codingStandardsIgnoreEnd
27
        /**
28
         * {@inheritdoc}
29
         */
30 6
        public function collect(Request $request, Response $response, \Exception $exception = null)
31
        {
32 6
            return $this->doCollect();
33
        }
34
    }
35
}
36