StatableTrait   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 47
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getState() 0 4 1
A setState() 0 4 1
A getAllStates() 0 4 1
A getStateGraph() 0 4 1
A getStateTransitions() 0 4 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