ShipmentDiscountCardId   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 34
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setCardId() 0 3 1
A setContractId() 0 3 1
A getContractId() 0 3 1
A __construct() 0 6 1
A getCardId() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Shipment;
6
7
use VasilDakov\Speedy\Traits\ToArray;
8
9
/**
10
 * Class ShipmentDiscountCardId.
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @author Valentin Valkanov <[email protected]>
14
 * @psalm-suppress PropertyNotSetInConstructor
15
 */
16
class ShipmentDiscountCardId
17
{
18
    use ToArray;
0 ignored issues
show
Bug introduced by
The trait VasilDakov\Speedy\Traits\ToArray requires the property $value which is not provided by VasilDakov\Speedy\Servic...\ShipmentDiscountCardId.
Loading history...
19
20
    private int $contractId;
21
22
    private int $cardId;
23
24 4
    public function __construct(
25
        int $contractId,
26
        int $cardId
27
    ) {
28 4
        $this->setContractId($contractId);
29 4
        $this->setCardId($cardId);
30
    }
31
32 1
    public function getContractId(): int
33
    {
34 1
        return $this->contractId;
35
    }
36
37 4
    public function setContractId(int $contractId): void
38
    {
39 4
        $this->contractId = $contractId;
40
    }
41
42 1
    public function getCardId(): int
43
    {
44 1
        return $this->cardId;
45
    }
46
47 4
    public function setCardId(int $cardId): void
48
    {
49 4
        $this->cardId = $cardId;
50
    }
51
}
52