Completed
Push — master ( 2322ba...25df9e )
by Kirill
04:32
created

Action::setType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity()
9
 * @ORM\Table(name="actions")
10
 */
11
class Action
12
{
13
    /**
14
     * @ORM\Column(type="integer")
15
     * @ORM\Id
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    private $id;
19
20
    /**
21
     * @ORM\Column(type="string", length=100)
22
     */
23
    private $name;
24
25
    /**
26
     * @ORM\Column(type="string", length=100)
27
     */
28
    private $executor;
29
30
    /**
31
     * @ORM\Column(type="text")
32
     */
33
    private $arguments;
34
35
    /**
36
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Device", inversedBy="actions")
37
     */
38
    private $device;
39
40
    /**
41
     * @ORM\Column(type="string", length=100)
42
     */
43
    private $type;
44
45
46
    /**
47
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\ActionHistory", mappedBy="action")
48
     */
49
    public $history;
50
51
52
    /**
53
     * @return mixed
54
     */
55
    public function getType()
56
    {
57
        return $this->type;
58
    }
59
60
    /**
61
     * @param mixed $type
62
     * @return Action
63
     */
64
    public function setType($type)
65
    {
66
        $this->type = $type;
67
        return $this;
68
    }
69
70
    /**
71
     * @return Device
72
     */
73
    public function getDevice()
74
    {
75
        return $this->device;
76
    }
77
78
    /**
79
     * @param mixed $device
80
     * @return Action
81
     */
82
    public function setDevice($device)
83
    {
84
        $this->device = $device;
85
        return $this;
86
    }
87
88
    /**
89
     * @return mixed
90
     */
91
    public function getArguments()
92
    {
93
        return $this->arguments;
94
    }
95
96
    /**
97
     * @param mixed $arguments
98
     * @return Action
99
     */
100
    public function setArguments($arguments)
101
    {
102
        $this->arguments = $arguments;
103
        return $this;
104
    }
105
106
107
    /**
108
     * @return mixed
109
     */
110
    public function getId()
111
    {
112
        return $this->id;
113
    }
114
115
    /**
116
     * @param mixed $id
117
     * @return Action
118
     */
119
    public function setId($id)
120
    {
121
        $this->id = $id;
122
        return $this;
123
    }
124
125
    /**
126
     * @return mixed
127
     */
128
    public function getName()
129
    {
130
        return $this->name;
131
    }
132
133
    /**
134
     * @param mixed $name
135
     * @return Action
136
     */
137
    public function setName($name)
138
    {
139
        $this->name = $name;
140
        return $this;
141
    }
142
143
    /**
144
     * @return mixed
145
     */
146
    public function getExecutor()
147
    {
148
        return $this->executor;
149
    }
150
151
    /**
152
     * @param mixed $executor
153
     * @return Action
154
     */
155
    public function setExecutor($executor)
156
    {
157
        $this->executor = $executor;
158
        return $this;
159
    }
160
161
    public function __toString()
162
    {
163
        return $this->getName();
164
    }
165
}
166