InjectorStateDTO::getParameters()   A
last analyzed

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 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