Passed
Push — feature/ECO-808-scrutinizer ( 956529...82fb0b )
by Andrey
05:28 queued 01:30
created

OrderNotificationFactory   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createOrderMessageFactory() 0 3 1
A createFailedAuthNotificationSender() 0 3 1
A createOrderAuthFailedTransaction() 0 5 1
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Amazonpay\Business\Payment\Handler\Transaction\Notification;
9
10
class OrderNotificationFactory implements OrderNotificationFactoryInterface
11
{
12
13
    /**
14
     * @return \SprykerEco\Zed\Amazonpay\Business\Payment\Handler\Transaction\AmazonpayTransactionInterface
15
     */
16
    public function createOrderAuthFailedTransaction()
17
    {
18
        return new OrderAuthFailedNotifyTransaction(
19
            $this->createFailedAuthNotificationSender(),
20
            $this->createOrderMessageFactory()
21
        );
22
    }
23
24
    /**
25
     * @return \SprykerEco\Zed\Amazonpay\Business\Payment\Handler\Transaction\Notification\OrderNotificationSenderInterface
26
     */
27
    protected function createFailedAuthNotificationSender()
28
    {
29
        return new OrderFailedAuthNotificationSender();
30
    }
31
32
    /**
33
     * @return \SprykerEco\Zed\Amazonpay\Business\Payment\Handler\Transaction\Notification\OrderMessageFactoryInterface
34
     */
35
    protected function createOrderMessageFactory()
36
    {
37
        return new OrderMessageFactory();
38
    }
39
40
}
41