Completed
Push — master ( 251d07...973a55 )
by Oleksandr
10s
created

IdentificationMapper::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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\ArvatoRss\Business\Api\Mapper\Aspect;
9
10
use Generated\Shared\Transfer\ArvatoRssIdentificationRequestTransfer;
11
use SprykerEco\Zed\ArvatoRss\ArvatoRssConfig;
12
13
class IdentificationMapper implements IdentificationMapperInterface
14
{
15
    /**
16
     * @var \SprykerEco\Zed\ArvatoRss\ArvatoRssConfig
17
     */
18
    protected $config;
19
20
    /**
21
     * @param \SprykerEco\Zed\ArvatoRss\ArvatoRssConfig $config
22
     */
23
    public function __construct(ArvatoRssConfig $config)
24
    {
25
        $this->config = $config;
26
    }
27
28
    /**
29
     * @api
30
     *
31
     * @return \Generated\Shared\Transfer\ArvatoRssIdentificationRequestTransfer
32
     */
33
    public function map()
34
    {
35
        $identificationTransfer = new ArvatoRssIdentificationRequestTransfer();
36
37
        $identificationTransfer->setClientId(
38
            $this->config->getClientId()
39
        );
40
        $identificationTransfer->setAuthorisation(
41
            $this->config->getAuthorization()
42
        );
43
44
        return $identificationTransfer;
45
    }
46
}
47