Passed
Pull Request — master (#4)
by Andrey
11:07 queued 03:32
created

AmazonpayToQuoteBridge   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 42
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuote() 0 3 1
A __construct() 0 3 1
A setQuote() 0 5 1
A clearQuote() 0 3 1
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Amazonpay\Dependency\Client;
9
10
use Generated\Shared\Transfer\QuoteTransfer;
11
12
class AmazonpayToQuoteBridge implements AmazonpayToQuoteInterface
13
{
14
15
    /**
16
     * @var \Spryker\Client\Quote\QuoteClientInterface
17
     */
18
    protected $quoteClient;
19
20
    /**
21
     * @param \Spryker\Client\Quote\QuoteClientInterface $quoteClient
22
     */
23
    public function __construct($quoteClient)
24
    {
25
        $this->quoteClient = $quoteClient;
26
    }
27
28
    /**
29
     * @return \Generated\Shared\Transfer\QuoteTransfer
30
     */
31
    public function getQuote()
32
    {
33
        return $this->quoteClient->getQuote();
34
    }
35
36
    /**
37
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
38
     *
39
     * @return static
40
     */
41
    public function setQuote(QuoteTransfer $quoteTransfer)
42
    {
43
        $this->quoteClient->setQuote($quoteTransfer);
44
45
        return $this;
46
    }
47
48
    /**
49
     * @return void
50
     */
51
    public function clearQuote()
52
    {
53
        $this->quoteClient->clearQuote();
54
    }
55
56
}
57