Completed
Push — master ( 14644c...858a29 )
by Kirill
04:24
created

Action::setArguments()   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 $alias;
29
30
    /**
31
     * @return mixed
32
     */
33
    public function getAlias()
34
    {
35
        return $this->alias;
36
    }
37
38
    /**
39
     * @param mixed $alias
40
     * @return Action
41
     */
42
    public function setAlias($alias)
43
    {
44
        $this->alias = $alias;
45
        return $this;
46
    }
47
48
    /**
49
     * @ORM\Column(type="string", length=100)
50
     */
51
    private $executor;
52
53
    /**
54
     * @ORM\Column(type="text")
55
     */
56
    private $arguments;
57
58
    /**
59
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Device", inversedBy="actions")
60
     */
61
    private $device;
62
63
    /**
64
     * @ORM\Column(type="string", length=100)
65
     */
66
    private $type;
67
68
69
    /**
70
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\ActionHistory", mappedBy="action")
71
     */
72
    public $history;
73
74
75
    /**
76
     * @return mixed
77
     */
78
    public function getType()
79
    {
80
        return $this->type;
81
    }
82
83
    /**
84
     * @param mixed $type
85
     * @return Action
86
     */
87
    public function setType($type)
88
    {
89
        $this->type = $type;
90
        return $this;
91
    }
92
93
    /**
94
     * @return Device
95
     */
96
    public function getDevice()
97
    {
98
        return $this->device;
99
    }
100
101
    /**
102
     * @param mixed $device
103
     * @return Action
104
     */
105
    public function setDevice($device)
106
    {
107
        $this->device = $device;
108
        return $this;
109
    }
110
111
    /**
112
     * @return mixed
113
     */
114
    public function getArguments()
115
    {
116
        return $this->arguments;
117
    }
118
119
    /**
120
     * @param mixed $arguments
121
     * @return Action
122
     */
123
    public function setArguments($arguments)
124
    {
125
        $this->arguments = $arguments;
126
        return $this;
127
    }
128
129
130
    /**
131
     * @return mixed
132
     */
133
    public function getId()
134
    {
135
        return $this->id;
136
    }
137
138
    /**
139
     * @param mixed $id
140
     * @return Action
141
     */
142
    public function setId($id)
143
    {
144
        $this->id = $id;
145
        return $this;
146
    }
147
148
    /**
149
     * @return mixed
150
     */
151
    public function getName()
152
    {
153
        return $this->name;
154
    }
155
156
    /**
157
     * @param mixed $name
158
     * @return Action
159
     */
160
    public function setName($name)
161
    {
162
        $this->name = $name;
163
        return $this;
164
    }
165
166
    /**
167
     * @return mixed
168
     */
169
    public function getExecutor()
170
    {
171
        return $this->executor;
172
    }
173
174
    /**
175
     * @param mixed $executor
176
     * @return Action
177
     */
178
    public function setExecutor($executor)
179
    {
180
        $this->executor = $executor;
181
        return $this;
182
    }
183
184
    public function __toString()
185
    {
186
        return $this->getName();
187
    }
188
}
189