Test Failed
Push — main ( 80b66f...88de3c )
by Vasil
03:26
created

CalculationRecipient::getPickupOfficeId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Calculation;
6
7
use VasilDakov\Speedy\ToArray;
8
9
/**
10
 * Class CalculationRecipient
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 * @version 1.0
15
 */
16
class CalculationRecipient
17
{
18
    use ToArray;
19
20
    private bool $privatePerson;
21
22
    private ?CalculationAddressLocation $addressLocation = null;
23
24
    private ?int $siteId = null;
25
26
    private ?int $pickupOfficeId = null;
27
28
    public function __construct(
29
        bool $privatePerson,
30
        ?int $pickupOfficeId = null,
31
        ?CalculationAddressLocation $addressLocation = null
32
    ) {
33
        $this->privatePerson = $privatePerson;
34
        $this->pickupOfficeId = $pickupOfficeId;
35
        $this->addressLocation = $addressLocation;
36
    }
37
38
    /**
39
     * @param int|null $siteId
40
     */
41
    public function setSiteId(?int $siteId): void
42
    {
43
        $this->siteId = $siteId;
44
    }
45
46
    /**
47
     * @return int|null
48
     */
49
    public function getSiteId(): ?int
50
    {
51
        return $this->siteId;
52
    }
53
54
    /**
55
     * @param int|null $pickupOfficeId
56
     */
57
    public function setPickupOfficeId(?int $pickupOfficeId): void
58
    {
59
        $this->pickupOfficeId = $pickupOfficeId;
60
    }
61
62
    /**
63
     * @return int|null
64
     */
65
    public function getPickupOfficeId(): ?int
66
    {
67
        return $this->pickupOfficeId;
68
    }
69
}
70