CrefoPayPostSaveHookPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A executeHook() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\CrefoPay\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
 * @method \SprykerEco\Zed\CrefoPay\Business\CrefoPayFacadeInterface getFacade()
17
 * @method \SprykerEco\Zed\CrefoPay\Communication\CrefoPayCommunicationFactory getFactory()
18
 * @method \SprykerEco\Zed\CrefoPay\CrefoPayConfig getConfig()
19
 *
20
 * @SuppressWarnings(PHPMD.NewPluginExtensionModuleRule)
21
 */
22
class CrefoPayPostSaveHookPlugin 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

22
class CrefoPayPostSaveHookPlugin 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...
23
{
24
    /**
25
     * {@inheritDoc}
26
     * - Makes reserve request to CrefoPay API.
27
     * - Updates payment entities and saves them to DB.
28
     * - Updates order items with necessary OMS statuses.
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()->executePostSaveHook($quoteTransfer, $checkoutResponse);
40
    }
41
}
42