Completed
Pull Request — master (#290)
by
unknown
36:49 queued 34:03
created

ChoosePaymentMethod::paymentIdentifier()   A

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\SyliusShopApiPlugin\Command;
6
7
use Webmozart\Assert\Assert;
8
9 View Code Duplication
final class ChoosePaymentMethod
10
{
11
    /**
12
     * @var mixed
13
     */
14
    private $paymentIdentifier;
15
16
    /**
17
     * @var string
18
     */
19
    private $paymentMethod;
20
21
    /**
22
     * @var string
23
     */
24
    private $orderToken;
25
26
    /**
27
     * @param string $orderToken
28
     * @param mixed $paymentIdentifier
29
     * @param string $paymentMethod
30
     */
31
    public function __construct($orderToken, $paymentIdentifier, $paymentMethod)
32
    {
33
        Assert::allString([$orderToken, $paymentMethod]);
34
35
        $this->orderToken = $orderToken;
36
        $this->paymentIdentifier = $paymentIdentifier;
37
        $this->paymentMethod = $paymentMethod;
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 paymentIdentifier()
52
    {
53
        return $this->paymentIdentifier;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function paymentMethod()
60
    {
61
        return $this->paymentMethod;
62
    }
63
}
64