Completed
Push — master ( 41948a...5bb6bb )
by Łukasz
17:08 queued 13:33
created

PutSimpleItemToCart   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A token() 0 4 1
A product() 0 4 1
A quantity() 0 4 1
1
<?php
2
3
namespace Sylius\ShopApiPlugin\Command;
4
5
final class PutSimpleItemToCart
6
{
7
    /**
8
     * @var string
9
     */
10
    private $token;
11
12
    /**
13
     * @var string
14
     */
15
    private $product;
16
17
    /**
18
     * @var int
19
     */
20
    private $quantity;
21
22
    /**
23
     * @param string $token
24
     * @param string $product
25
     * @param int $quantity
26
     */
27
    public function __construct($token, $product, $quantity)
28
    {
29
        $this->token = $token;
30
        $this->product = $product;
31
        $this->quantity = $quantity;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function token()
38
    {
39
        return $this->token;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function product()
46
    {
47
        return $this->product;
48
    }
49
50
    /**
51
     * @return int
52
     */
53
    public function quantity()
54
    {
55
        return $this->quantity;
56
    }
57
}
58