Failed Conditions
Pull Request — master (#131)
by Łukasz
03:32
created

PickupCart   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 41
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A channelCode() 0 4 1
A orderToken() 0 4 1
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