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

IdentificationMapper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 34
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A map() 0 13 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