Completed
Push — master ( 5ac2a2...32410d )
by Kirill
06:44
created

Action::setAlias()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 5
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 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="actions")
10
 */
11 View Code Duplication
class Action
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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 1
    public function setAlias($alias)
43
    {
44 1
        $this->alias = $alias;
45 1
        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
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\VarHook", mappedBy="action")
76
     */
77
    public $hooks;
78
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getType()
84
    {
85
        return $this->type;
86
    }
87
88
    /**
89
     * @param mixed $type
90
     * @return Action
91
     */
92 1
    public function setType($type)
93
    {
94 1
        $this->type = $type;
95 1
        return $this;
96
    }
97
98
    /**
99
     * @return Device
100
     */
101
    public function getDevice()
102
    {
103
        return $this->device;
104
    }
105
106
    /**
107
     * @param mixed $device
108
     * @return Action
109
     */
110 1
    public function setDevice($device)
111
    {
112 1
        $this->device = $device;
113 1
        return $this;
114
    }
115
116
    /**
117
     * @return mixed
118
     */
119
    public function getArguments()
120
    {
121
        return $this->arguments;
122
    }
123
124
    /**
125
     * @param mixed $arguments
126
     * @return Action
127
     */
128 1
    public function setArguments($arguments)
129
    {
130 1
        $this->arguments = $arguments;
131 1
        return $this;
132
    }
133
134
135
    /**
136
     * @return mixed
137
     */
138
    public function getId()
139
    {
140
        return $this->id;
141
    }
142
143
    /**
144
     * @param mixed $id
145
     * @return Action
146
     */
147
    public function setId($id)
148
    {
149
        $this->id = $id;
150
        return $this;
151
    }
152
153
    /**
154
     * @return mixed
155
     */
156
    public function getName()
157
    {
158
        return $this->name;
159
    }
160
161
    /**
162
     * @param mixed $name
163
     * @return Action
164
     */
165 1
    public function setName($name)
166
    {
167 1
        $this->name = $name;
168 1
        return $this;
169
    }
170
171
    /**
172
     * @return mixed
173
     */
174
    public function getExecutor()
175
    {
176
        return $this->executor;
177
    }
178
179
    /**
180
     * @param mixed $executor
181
     * @return Action
182
     */
183 1
    public function setExecutor($executor)
184
    {
185 1
        $this->executor = $executor;
186 1
        return $this;
187
    }
188
189
    public function __toString()
190
    {
191
        return $this->getName();
192
    }
193
}
194