Passed
Push — master ( a2100c...af4f13 )
by Andrey
06:37
created

AmazonpayToCheckoutBridge::placeOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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;
1 ignored issue
show
Bug introduced by
The type Generated\Shared\Transfer\QuoteTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Spryker\Client\Checkout\CheckoutClientInterface;
12
13
class AmazonpayToCheckoutBridge implements AmazonpayToCheckoutInterface
14
{
15
16
    /**
17
     * @var \Spryker\Client\Checkout\CheckoutClient
18
     */
19
    protected $checkoutClient;
20
21
    /**
22
     * @param \Spryker\Client\Checkout\CheckoutClientInterface $checkoutClient
23
     */
24
    public function __construct(CheckoutClientInterface $checkoutClient)
25
    {
26
        $this->checkoutClient = $checkoutClient;
0 ignored issues
show
Documentation Bug introduced by
$checkoutClient is of type Spryker\Client\Checkout\CheckoutClientInterface, but the property $checkoutClient was declared to be of type Spryker\Client\Checkout\CheckoutClient. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
27
    }
28
29
    /**
30
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
31
     *
32
     * @return \Generated\Shared\Transfer\CheckoutResponseTransfer
1 ignored issue
show
Bug introduced by
The type Generated\Shared\Transfer\CheckoutResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
33
     */
34
    public function placeOrder(QuoteTransfer $quoteTransfer)
35
    {
36
        return $this->checkoutClient->placeOrder($quoteTransfer);
37
    }
38
}
39