Passed
Push — feature/eco-3656/eco-3658-enab... ( eb5eb7...0e46da )
by
unknown
11:16 queued 05:26
created

PaymentStep::isBreadcrumbItemHidden()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 1
b 1
f 0
cc 2
nc 2
nop 1
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