Code Duplication    Length = 55-55 lines in 2 locations

src/Command/ChoosePaymentMethod.php 1 location

@@ 9-63 (lines=55) @@
6
7
use Webmozart\Assert\Assert;
8
9
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

src/Command/ChooseShippingMethod.php 1 location

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