AmazonPayToOmsBridge   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isOrderFlaggedAll() 0 3 1
A triggerEvent() 0 3 1
A __construct() 0 3 1
A checkConditions() 0 3 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\Dependency\Facade;
9
10
use Propel\Runtime\Collection\ObjectCollection;
11
12
class AmazonPayToOmsBridge implements AmazonPayToOmsInterface
13
{
14
    /**
15
     * @var \Spryker\Zed\Oms\Business\OmsFacadeInterface
16
     */
17
    protected $omsFacade;
18
19
    /**
20
     * @param \Spryker\Zed\Oms\Business\OmsFacadeInterface $omsFacade
21
     */
22
    public function __construct($omsFacade)
23
    {
24
        $this->omsFacade = $omsFacade;
25
    }
26
27
    /**
28
     * @param string $eventId
29
     * @param \Propel\Runtime\Collection\ObjectCollection $orderItems
30
     * @param array $logContext
31
     * @param array $data
32
     *
33
     * @return array
34
     */
35
    public function triggerEvent($eventId, ObjectCollection $orderItems, array $logContext, array $data = [])
36
    {
37
        return $this->omsFacade->triggerEvent($eventId, $orderItems, $logContext, $data);
38
    }
39
40
    /**
41
     * @param array $logContext
42
     *
43
     * @return int
44
     */
45
    public function checkConditions(array $logContext = [])
46
    {
47
        return $this->omsFacade->checkConditions($logContext);
48
    }
49
50
    /**
51
     * @param int $idOrder
52
     * @param string $flag
53
     *
54
     * @return bool
55
     */
56
    public function isOrderFlaggedAll($idOrder, $flag)
57
    {
58
        return $this->omsFacade->isOrderFlaggedAll($idOrder, $flag);
59
    }
60
}
61