InxmailFacade   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A handleCustomerResetPasswordEvent() 0 5 1
A handleShippingConfirmationEvent() 0 5 1
A handlePaymentNotReceivedEvent() 0 5 1
A handleCustomerRegistrationEvent() 0 5 1
A handleOrderCanceledEvent() 0 5 1
A handleNewOrderEvent() 0 5 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\Inxmail\Business;
9
10
use Generated\Shared\Transfer\CustomerTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\CustomerTransfer 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\Zed\Kernel\Business\AbstractFacade;
12
13
/**
14
 * @method \SprykerEco\Zed\Inxmail\Business\InxmailBusinessFactory getFactory()
15
 */
16
class InxmailFacade extends AbstractFacade implements InxmailFacadeInterface
17
{
18
    /**
19
     * {@inheritDoc}
20
     *
21
     * @api
22
     *
23
     * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
24
     *
25
     * @return void
26
     */
27
    public function handleCustomerRegistrationEvent(CustomerTransfer $customerTransfer): void
28
    {
29
        $this->getFactory()
30
            ->createCustomerRegistrationEventHandler()
31
            ->handle($customerTransfer);
32
    }
33
34
    /**
35
     * {@inheritDoc}
36
     *
37
     * @api
38
     *
39
     * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
40
     *
41
     * @return void
42
     */
43
    public function handleCustomerResetPasswordEvent(CustomerTransfer $customerTransfer): void
44
    {
45
        $this->getFactory()
46
            ->createCustomerResetPasswordEventHandler()
47
            ->handle($customerTransfer);
48
    }
49
50
    /**
51
     * {@inheritDoc}
52
     *
53
     * @api
54
     *
55
     * @param int $idSalesOrder
56
     *
57
     * @return void
58
     */
59
    public function handleNewOrderEvent(int $idSalesOrder): void
60
    {
61
        $this->getFactory()
62
            ->createNewOrderEventHandler()
63
            ->handle($idSalesOrder);
64
    }
65
66
    /**
67
     * {@inheritDoc}
68
     *
69
     * @api
70
     *
71
     * @param int $idSalesOrder
72
     *
73
     * @return void
74
     */
75
    public function handleOrderCanceledEvent(int $idSalesOrder): void
76
    {
77
        $this->getFactory()
78
            ->createOrderCanceledEventHandler()
79
            ->handle($idSalesOrder);
80
    }
81
82
    /**
83
     * {@inheritDoc}
84
     *
85
     * @api
86
     *
87
     * @param int $idSalesOrder
88
     *
89
     * @return void
90
     */
91
    public function handlePaymentNotReceivedEvent(int $idSalesOrder): void
92
    {
93
        $this->getFactory()
94
            ->createPaymentNotReceivedEventHandler()
95
            ->handle($idSalesOrder);
96
    }
97
98
    /**
99
     * {@inheritDoc}
100
     *
101
     * @api
102
     *
103
     * @param int $idSalesOrder
104
     *
105
     * @return void
106
     */
107
    public function handleShippingConfirmationEvent(int $idSalesOrder): void
108
    {
109
        $this->getFactory()
110
            ->createShippingConfirmationEventHandler()
111
            ->handle($idSalesOrder);
112
    }
113
}
114