Completed
Pull Request — master (#131)
by Łukasz
02:49
created

PickupCart::orderToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Sylius\ShopApiPlugin\Command;
4
5
use Webmozart\Assert\Assert;
6
7
final class PickupCart
8
{
9
    /**
10
     * @var string
11
     */
12
    private $orderToken;
13
14
    /**
15
     * @var string
16
     */
17
    private $channelCode;
18
19
    /**
20
     * @param string $orderToken
21
     * @param string $channelCode
22
     */
23
    public function __construct($orderToken, $channelCode)
24
    {
25
        Assert::string($orderToken, 'Expected order token to be string, got %s');
26
        Assert::string($channelCode, 'Expected channel code to be string, got %s');
27
28
        $this->orderToken = $orderToken;
29
        $this->channelCode = $channelCode;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function orderToken()
36
    {
37
        return $this->orderToken;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function channelCode()
44
    {
45
        return $this->channelCode;
46
    }
47
}
48