ActionHistory   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 146
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 46.88%

Importance

Changes 0
Metric Value
wmc 13
lcom 0
cbo 1
dl 0
loc 146
ccs 15
cts 32
cp 0.4688
rs 10
c 0
b 0
f 0

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getPerformed() 0 4 1
A getSource() 0 4 1
A getChangeSet() 0 4 1
A getId() 0 4 1
A setId() 0 5 1
A getTime() 0 4 1
A __toString() 0 4 1
A getAction() 0 4 1
A setPerformed() 0 5 1
A setSource() 0 5 1
A setChangeSet() 0 5 1
A setTime() 0 4 1
A setAction() 0 5 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="action_history")
10
 */
11
class ActionHistory
12
{
13
    /**
14
     * @ORM\Column(type="integer")
15
     * @ORM\Id
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    private $id;
19
20
    /**
21
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Action", inversedBy="history")
22
     */
23
    private $action;
24
25
    /**
26
     * @return boolean
27
     */
28
    public function getPerformed()
29
    {
30
        return $this->performed;
31
    }
32
33
    /**
34
     * @param mixed $performed
35
     * @return ActionHistory
36
     */
37 1
    public function setPerformed($performed)
38
    {
39 1
        $this->performed = $performed;
40 1
        return $this;
41
    }
42
43
    /**
44
     * @var boolean
45
     * @ORM\Column(type="boolean")
46
     */
47
    private $performed;
48
49
    /**
50
     * @return mixed
51
     */
52
    public function getSource()
53
    {
54
        return $this->source;
55
    }
56
57
    /**
58
     * @param mixed $source
59
     * @return ActionHistory
60
     */
61 1
    public function setSource($source)
62
    {
63 1
        $this->source = $source;
64 1
        return $this;
65
    }
66
67
    /**
68
     * @ORM\Column(type="string", length=20)
69
     */
70
    private $source = 'internal';
71
72
    /**
73
     * @return mixed
74
     */
75
    public function getChangeSet()
76
    {
77
        return $this->changeSet;
78
    }
79
80
    /**
81
     * @param mixed $changeSet
82
     * @return ActionHistory
83
     */
84 1
    public function setChangeSet($changeSet)
85
    {
86 1
        $this->changeSet = $changeSet;
87 1
        return $this;
88
    }
89
90
    /**
91
     * @ORM\Column(type="text")
92
     */
93
    private $changeSet;
94
95
    /**
96
     * @ORM\Column(type="datetime", nullable=true)
97
     */
98
    private $time;
99
100
    /**
101
     * @return mixed
102
     */
103
    public function getId()
104
    {
105
        return $this->id;
106
    }
107
108
    /**
109
     * @param mixed $id
110
     * @return ActionHistory
111
     */
112
    public function setId($id)
113
    {
114
        $this->id = $id;
115
        return $this;
116
    }
117
118
    /**
119
     * @return mixed
120
     */
121
    public function getTime()
122
    {
123
        return $this->time;
124
    }
125
126
    /**
127
     * @param mixed $time
128
     */
129 1
    public function setTime($time)
130
    {
131 1
        $this->time = $time;
132 1
    }
133
134
    public function __toString()
135
    {
136
        return $this->getAction()->getName();
137
    }
138
139
    /**
140
     * @return Action
141
     */
142
    public function getAction()
143
    {
144
        return $this->action;
145
    }
146
147
    /**
148
     * @param mixed $action
149
     * @return ActionHistory
150
     */
151 1
    public function setAction($action)
152
    {
153 1
        $this->action = $action;
154 1
        return $this;
155
    }
156
}
157