StatableTrait::setState()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace DoS\ResourceBundle\Model;
4
5
trait StatableTrait
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $state;
11
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getState()
16
    {
17
        return $this->state;
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function setState($state)
24
    {
25
        $this->state = $state;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getAllStates()
32
    {
33
        throw new \LogicException('Override me.');
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function getStateGraph()
40
    {
41
        throw new \LogicException('Override me.');
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getStateTransitions()
48
    {
49
        throw new \LogicException('Override me.');
50
    }
51
}
52