SlumberId   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 30
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setId() 0 6 1
1
<?php
2
/**
3
 * File was created 30.09.2015 12:57
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Data\Addon;
7
8
use PeekAndPoke\Component\Slumber\Annotation\Slumber;
9
10
/**
11
 * @author Karsten J. Gerber <[email protected]>
12
 */
13
trait SlumberId
14
{
15
    /**
16
     * @var string
17
     *
18
     * @Slumber\AsString()
19
     * @Slumber\Store\AsId()
20
     */
21
    protected $id;
22
23
    /**
24
     * @return string
25
     */
26 18
    public function getId()
27
    {
28 18
        return $this->id;
29
    }
30
31
    /**
32
     * @param string $id
33
     *
34
     * @return $this
35
     */
36 4
    public function setId($id)
37
    {
38 4
        $this->id = (string) $id;
39
40 4
        return $this;
41
    }
42
}
43