Completed
Branch master (9d8d38)
by Łukasz
03:25
created

AddCoupon::couponCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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