AsIsMapper   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 6
dl 0
loc 41
c 0
b 0
f 0
rs 10
ccs 9
cts 9
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A awake() 0 3 1
A slumber() 0 3 1
A getOptions() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * File was created 30.09.2015 07:46
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Core\Codec\Property;
7
8
use PeekAndPoke\Component\Slumber\Annotation\Slumber\AsIs;
9
use PeekAndPoke\Component\Slumber\Core\Codec\Awaker;
10
use PeekAndPoke\Component\Slumber\Core\Codec\Slumberer;
11
12
/**
13
 * @author Karsten J. Gerber <[email protected]>
14
 */
15
class AsIsMapper extends AbstractPropertyMapper
16
{
17
    /** @var AsIs */
18
    private $options;
19
20
    /**
21
     * @param AsIs $options
22
     */
23 20
    public function __construct(AsIs $options)
24
    {
25 20
        $this->options = $options;
26 20
    }
27
28
    /**
29
     * @return AsIs
30
     */
31 4
    public function getOptions()
32
    {
33 4
        return $this->options;
34
    }
35
36
    /**
37
     * @param Slumberer $slumberer
38
     * @param mixed     $value
39
     *
40
     * @return mixed
41
     */
42 9
    public function slumber(Slumberer $slumberer, $value)
43
    {
44 9
        return $value;
45
    }
46
47
    /**
48
     * @param Awaker $awaker
49
     * @param mixed  $value
50
     *
51
     * @return mixed
52
     */
53 6
    public function awake(Awaker $awaker, $value)
54
    {
55 6
        return $value;
56
    }
57
}
58