Passed
Push — main ( c28c5f...2ef199 )
by Vasil
03:30
created

DestinationServicesRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 18
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getRecipient() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Neutrino package.
5
 *
6
 * (c) Vasil Dakov <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace VasilDakov\Speedy\Service\Service;
15
16
use VasilDakov\Speedy\Service\Calculation\CalculationRecipient;
17
use VasilDakov\Speedy\Service\Calculation\CalculationSender;
18
use VasilDakov\Speedy\Service\Shipment\CreateShipmentRequest;
19
use VasilDakov\Speedy\Service\Shipment\ShipmentRecipient;
20
use VasilDakov\Speedy\Traits\ToArray;
21
22
/**
23
 * Class DestinationServicesRequest.
24
 *
25
 * @author Vasil Dakov <[email protected]>
26
 * @copyright 2009-2023 Neutrino.bg
27
 *
28
 * @version 1.0
29
 */
30
class DestinationServicesRequest extends CreateShipmentRequest
31
{
32
    use ToArray;
33
34
    private ?\DateTime $date = null;
0 ignored issues
show
introduced by
The private property $date is not used, and could be removed.
Loading history...
35
36
    private ?CalculationSender $sender = null;
0 ignored issues
show
introduced by
The private property $sender is not used, and could be removed.
Loading history...
37
38
    private CalculationRecipient $recipient;
39
40 2
    public function __construct(CalculationRecipient $recipient)
41
    {
42 2
        $this->recipient = $recipient;
43
    }
44
45 1
    public function getRecipient(): CalculationRecipient
46
    {
47 1
        return $this->recipient;
48
    }
49
}
50