Passed
Push — main ( 8bdffa...c425e9 )
by Vasil
04:29
created

CalculationSender   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getClientId() 0 3 1
A __construct() 0 4 1
A getDropoffOfficeId() 0 3 1
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 CalculationSender
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 * @version 1.0
15
 */
16
class CalculationSender
17
{
18
    use ToArray;
19
20
    private int $clientId;
21
22
    private ?int $dropoffOfficeId;
23
24 2
    public function __construct(int $clientId, int $dropoffOfficeId = null)
25
    {
26 2
        $this->clientId = $clientId;
27 2
        $this->dropoffOfficeId = $dropoffOfficeId;
28
    }
29
30
    /**
31
     * @return int
32
     */
33 1
    public function getClientId(): int
34
    {
35 1
        return $this->clientId;
36
    }
37
38
    /**
39
     * @return int|null
40
     */
41 1
    public function getDropoffOfficeId(): ?int
42
    {
43 1
        return $this->dropoffOfficeId;
44
    }
45
}
46