ChooseShippingMethod::shippingMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sylius\ShopApiPlugin\Command;
6
7
use Webmozart\Assert\Assert;
8
9 View Code Duplication
final class ChooseShippingMethod
10
{
11
    /**
12
     * @var mixed
13
     */
14
    private $shipmentIdentifier;
15
16
    /**
17
     * @var string
18
     */
19
    private $shippingMethod;
20
21
    /**
22
     * @var string
23
     */
24
    private $orderToken;
25
26
    /**
27
     * @param string $orderToken
28
     * @param mixed $shipmentIdentifier
29
     * @param string $shippingMethod
30
     */
31
    public function __construct($orderToken, $shipmentIdentifier, $shippingMethod)
32
    {
33
        Assert::allString([$orderToken, $shippingMethod]);
34
35
        $this->orderToken = $orderToken;
36
        $this->shipmentIdentifier = $shipmentIdentifier;
37
        $this->shippingMethod = $shippingMethod;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function orderToken()
44
    {
45
        return $this->orderToken;
46
    }
47
48
    /**
49
     * @return mixed
50
     */
51
    public function shipmentIdentifier()
52
    {
53
        return $this->shipmentIdentifier;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function shippingMethod()
60
    {
61
        return $this->shippingMethod;
62
    }
63
}
64