Passed
Pull Request — feature/eco-3656/dev-paypal-ex... (#40)
by
unknown
10:33 queued 05:24
created

PaymentStep   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
eloc 6
dl 0
loc 15
rs 10
c 1
b 1
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isBreadcrumbItemHidden() 0 8 2
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Yves\Computop\CheckoutPage\Process\Steps;
9
10
use Spryker\Shared\Kernel\Transfer\AbstractTransfer;
11
use Spryker\Shared\Kernel\Transfer\Exception\NullValueException;
12
use SprykerShop\Yves\CheckoutPage\Process\Steps\PaymentStep as SprykerShopPaymentStep;
13
14
class PaymentStep extends SprykerShopPaymentStep
15
{
16
    /**
17
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
0 ignored issues
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...
18
     *
19
     * @return bool
20
     */
21
    public function isBreadcrumbItemHidden(AbstractTransfer $quoteTransfer): bool
22
    {
23
        try {
24
            $quoteTransfer->getPaymentOrFail()->getComputopPayPalExpressOrFail();
0 ignored issues
show
Bug introduced by
The method getPaymentOrFail() does not exist on Spryker\Shared\Kernel\Transfer\AbstractTransfer. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
            $quoteTransfer->/** @scrutinizer ignore-call */ 
25
                            getPaymentOrFail()->getComputopPayPalExpressOrFail();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
26
            return true;
27
        } catch (NullValueException $exception) {
28
            return false;
29
        }
30
    }
31
}
32