InjectorStateDTO   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 38.46%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 62
ccs 5
cts 13
cp 0.3846
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A getProviderName() 0 4 1
A getEntityName() 0 4 1
A getEntityDescription() 0 4 1
A getParameters() 0 4 1
1
<?php
2
3
namespace SmartGamma\Behat\PactExtension\Infrastructure\ProviderState;
4
5
class InjectorStateDTO
6
{
7
    /**
8
     * @var string
9
     */
10
    private $providerName;
11
12
    /**
13
     * @var string
14
     */
15
    private $entityName;
16
17
    /**
18
     * @var array
19
     */
20
    private $parameters = [];
21
22
    /**
23
     * @var string
24
     */
25
    private $entityDescription;
26
27 2
    public function __construct(string $providerName, string $entityName, array $parameters, ?string $entityDescription = null)
28
    {
29 2
        $this->providerName      = $providerName;
30 2
        $this->entityName        = $entityName;
31 2
        $this->entityDescription = $entityDescription ? '(' . $entityDescription . ')' : '';
32 2
        $this->parameters        = $parameters;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getProviderName(): string
39
    {
40
        return $this->providerName;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getEntityName()
47
    {
48
        return $this->entityName;
49
    }
50
51
    /**
52
     * @return string|null
53
     */
54
    public function getEntityDescription()
55
    {
56
        return $this->entityDescription;
57
    }
58
59
    /**
60
     * @return array
61
     */
62
    public function getParameters()
63
    {
64
        return $this->parameters;
65
    }
66
}
67