PayoneCheckoutPostSaveHookPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A executeHook() 0 3 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\Zed\Payone\Communication\Plugin\Checkout;
9
10
use Generated\Shared\Transfer\CheckoutResponseTransfer;
0 ignored issues
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...
11
use Generated\Shared\Transfer\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...
12
use Spryker\Zed\Checkout\Dependency\Plugin\CheckoutPostSaveHookInterface;
13
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
14
15
/**
16
 * @deprecated Use {@link \SprykerEco\Zed\Payone\Communication\Plugin\Checkout\PayoneCheckoutPostSavePlugin} instead.
17
 *
18
 * @method \SprykerEco\Zed\Payone\Communication\PayoneCommunicationFactory getFactory()
19
 * @method \SprykerEco\Zed\Payone\Business\PayoneFacadeInterface getFacade()
20
 * @method \SprykerEco\Zed\Payone\Persistence\PayoneQueryContainerInterface getQueryContainer()
21
 * @method \SprykerEco\Zed\Payone\PayoneConfig getConfig()
22
 */
23
class PayoneCheckoutPostSaveHookPlugin extends AbstractPlugin implements CheckoutPostSaveHookInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Spryker\Zed\Checkout\Dep...utPostSaveHookInterface has been deprecated: Use {@link \Spryker\Zed\CheckoutExtension\Dependency\Plugin\CheckoutPostSaveInterface} instead. ( Ignorable by Annotation )

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

23
class PayoneCheckoutPostSaveHookPlugin extends AbstractPlugin implements /** @scrutinizer ignore-deprecated */ CheckoutPostSaveHookInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
24
{
25
    /**
26
     * {@inheritDoc}
27
     * - Executes `authorization` or `pre-authorization` API call depends on payment method.
28
     * - Updates `CheckoutResponseTransfer` accordingly to API response.
29
     *
30
     * @api
31
     *
32
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
33
     * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponse
34
     *
35
     * @return void
36
     */
37
    public function executeHook(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse)
38
    {
39
        $this->getFacade()->executeCheckoutPostSaveHook($quoteTransfer, $checkoutResponse);
0 ignored issues
show
Deprecated Code introduced by
The function SprykerEco\Zed\Payone\Bu...eCheckoutPostSaveHook() has been deprecated: Use {@link \SprykerEco\Zed\Payone\Business\PayoneFacadeInterface::orderPostSave()} instead. ( Ignorable by Annotation )

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

39
        /** @scrutinizer ignore-deprecated */ $this->getFacade()->executeCheckoutPostSaveHook($quoteTransfer, $checkoutResponse);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
40
    }
41
}
42