InteractionResponseDTO   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 40%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getStatus() 0 4 1
A getRawParameters() 0 4 1
A getMatchingObjectStructure() 0 4 1
1
<?php
2
3
namespace SmartGamma\Behat\PactExtension\Infrastructure\Interaction;
4
5
class InteractionResponseDTO
6
{
7
    /**
8
     * @var int
9
     */
10
    private $status;
11
12
    /**
13
     * @var array
14
     */
15
    private $rawParameters;
16
17
    /**
18
     * @var array
19
     */
20
    private $matchingObjectStructures = [];
21
22
    /**
23
     * InteractionResponseDTO constructor.
24
     *
25
     * @param int   $status
26
     * @param array $rawParameters
27
     * @param array $matchingObjectStructures
28
     */
29 7
    public function __construct(int $status, array $rawParameters = [], array $matchingObjectStructures = [])
30
    {
31 7
        $this->status = $status;
32 7
        $this->rawParameters = $rawParameters;
33 7
        $this->matchingObjectStructures = $matchingObjectStructures;
34
    }
35
36
    /**
37
     * @return int
38
     */
39
    public function getStatus(): int
40
    {
41
        return $this->status;
42
    }
43
44
    /**
45
     * @return array
46
     */
47
    public function getRawParameters(): array
48
    {
49
        return $this->rawParameters;
50
    }
51
52
    /**
53
     * @param string $objectName
54
     *
55
     * @return mixed
56
     */
57
    public function getMatchingObjectStructure(string $objectName)
58
    {
59
        return $this->matchingObjectStructures[$objectName];
60
    }
61
}
62