Completed
Push — master ( 4413ea...c99ea4 )
by Aurimas
02:59
created

BaseDataMapper::setDataMappers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Thruster\Component\DataMapper;
4
5
/**
6
 * Class BaseDataMapper
7
 *
8
 * @package Thruster\Component\DataMapper
9
 * @author  Aurimas Niekis <[email protected]>
10
 */
11
abstract class BaseDataMapper implements DataMapperInterface
12
{
13
    /**
14
     * @var DataMappers
15
     */
16
    protected $dataMappers;
17
    
18
    /**
19
     * @inheritDoc
20
     */
21 1
    public function setDataMappers(DataMappers $dataMappers)
22
    {
23 1
        $this->dataMappers = $dataMappers;
24
25 1
        return $this;
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31 1
    public function getMapper(string $name) : DataMapper
32
    {
33 1
        return $this->dataMappers->getMapper($name);
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39 1
    public function supports($input) : bool
40
    {
41 1
        return true;
42
    }
43
}
44