__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 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\Heidelpay\Dependency\QueryContainer;
9
10
class HeidelpayToSalesQueryContainerBridge implements HeidelpayToSalesQueryContainerInterface
11
{
12
    /**
13
     * @var \Spryker\Zed\Sales\Persistence\SalesQueryContainerInterface
14
     */
15
    protected $salesQueryContainer;
16
17
    /**
18
     * @param \Spryker\Zed\Sales\Persistence\SalesQueryContainerInterface $salesQueryContainer
19
     */
20
    public function __construct($salesQueryContainer)
21
    {
22
        $this->salesQueryContainer = $salesQueryContainer;
23
    }
24
25
    /**
26
     * @param string $orderReference
27
     *
28
     * @return \Orm\Zed\Sales\Persistence\SpySalesOrder
29
     */
30
    public function getOrderByReference(string $orderReference)
31
    {
32
        return $this->salesQueryContainer->querySalesOrder()
33
            ->findOneByOrderReference($orderReference);
34
    }
35
}
36