Passed
Branch master (d2a8d4)
by Oleksandr
07:46
created

AbstractMethod   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A mapHeadData() 0 5 1
A __construct() 0 9 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Request\Service\Method;
9
10
use SprykerEco\Zed\Ratepay\Business\Api\Mapper\MapperFactory;
11
use SprykerEco\Zed\Ratepay\Business\Api\Model\RequestModelBuilderInterface;
12
use SprykerEco\Zed\Ratepay\Business\Request\RequestMethodInterface;
13
use SprykerEco\Zed\Ratepay\Persistence\RatepayQueryContainerInterface;
14
15
abstract class AbstractMethod implements RequestMethodInterface
16
{
17
    /**
18
     * @var \SprykerEco\Zed\Ratepay\Business\Api\Adapter\AdapterInterface
19
     */
20
    protected $adapter;
21
22
    /**
23
     * @var \SprykerEco\Zed\Ratepay\Business\Api\Model\RequestModelBuilderInterface
24
     */
25
    protected $modelFactory;
26
27
    /**
28
     * @var \SprykerEco\Zed\Ratepay\Business\Api\Mapper\MapperFactory
29
     */
30
    protected $mapperFactory;
31
32
    /**
33
     * @var \SprykerEco\Zed\Ratepay\Persistence\RatepayQueryContainerInterface $queryContainer
34
     */
35
    protected $queryContainer;
36
37
    /**
38
     * @param \SprykerEco\Zed\Ratepay\Business\Api\Model\RequestModelBuilderInterface $modelFactory
39
     * @param \SprykerEco\Zed\Ratepay\Business\Api\Mapper\MapperFactory $mapperFactory
40
     * @param \SprykerEco\Zed\Ratepay\Persistence\RatepayQueryContainerInterface $queryContainer
41
     */
42
    public function __construct(
43
        RequestModelBuilderInterface $modelFactory,
44
        MapperFactory $mapperFactory,
45
        RatepayQueryContainerInterface $queryContainer
46
    ) {
47
48
        $this->modelFactory = $modelFactory;
49
        $this->mapperFactory = $mapperFactory;
50
        $this->queryContainer = $queryContainer;
51
    }
52
53
    /**
54
     * @return void
55
     */
56
    protected function mapHeadData()
57
    {
58
        $this->mapperFactory
59
            ->createHeadMapper()
60
            ->map();
61
    }
62
}
63