1
|
|
|
<?php namespace Comodojo\Extender\Traits; |
2
|
|
|
|
3
|
|
|
use \Comodojo\Extender\Task\TaskParameters; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* @package Comodojo Extender |
7
|
|
|
* @author Marco Giovinazzi <[email protected]> |
8
|
|
|
* @license MIT |
9
|
|
|
* |
10
|
|
|
* LICENSE: |
11
|
|
|
* |
12
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
13
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
14
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
15
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
16
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
17
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
18
|
|
|
* THE SOFTWARE. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
trait BaseScheduleEntityTrait { |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var integer |
25
|
|
|
* |
26
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
27
|
|
|
* @ORM\Id |
28
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
29
|
|
|
*/ |
30
|
|
|
protected $id; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
* |
35
|
|
|
* @ORM\Column(name="name", type="string", length=256, nullable=false) |
36
|
|
|
*/ |
37
|
|
|
protected $name; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
* |
42
|
|
|
* @ORM\Column(name="task", type="string", length=256, nullable=false) |
43
|
|
|
*/ |
44
|
|
|
protected $task; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var string |
48
|
|
|
* |
49
|
|
|
* @ORM\Column(name="parameters", type="array", nullable=false) |
50
|
|
|
*/ |
51
|
|
|
protected $parameters = []; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Get queue item's id |
55
|
|
|
* |
56
|
|
|
* @return integer |
57
|
|
|
*/ |
58
|
|
|
public function getId() { |
59
|
|
|
|
60
|
|
|
return $this->id; |
61
|
|
|
|
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Set queue item's id |
66
|
|
|
* |
67
|
|
|
* @param string $id |
68
|
|
|
* @return Schedule |
|
|
|
|
69
|
|
|
*/ |
70
|
|
|
public function setId($id) { |
71
|
|
|
|
72
|
|
|
$this->id = $id; |
|
|
|
|
73
|
|
|
|
74
|
|
|
return $this; |
75
|
|
|
|
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Get queue item's name |
80
|
|
|
* |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function getName() { |
84
|
|
|
|
85
|
|
|
return $this->name; |
86
|
|
|
|
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Set queue item's name |
91
|
|
|
* |
92
|
|
|
* @param string $name |
93
|
|
|
* @return Schedule |
94
|
|
|
*/ |
95
|
|
|
public function setName($name) { |
96
|
|
|
|
97
|
|
|
$this->name = $name; |
98
|
|
|
|
99
|
|
|
return $this; |
100
|
|
|
|
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* Get associated task |
105
|
|
|
* |
106
|
|
|
* @return string |
107
|
|
|
*/ |
108
|
|
|
public function getTask() { |
109
|
|
|
|
110
|
|
|
return $this->task; |
111
|
|
|
|
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* Set associated task |
116
|
|
|
* |
117
|
|
|
* @param string $task |
118
|
|
|
* @return Schedule |
119
|
|
|
*/ |
120
|
|
|
public function setTask($task) { |
121
|
|
|
|
122
|
|
|
$this->task = $task; |
123
|
|
|
|
124
|
|
|
return $this; |
125
|
|
|
|
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Get queue item's parameters |
130
|
|
|
* |
131
|
|
|
* @return TaskParameters |
132
|
|
|
*/ |
133
|
|
|
public function getParameters() { |
134
|
|
|
|
135
|
|
|
return new TaskParameters($this->parameters); |
|
|
|
|
136
|
|
|
|
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Set queue item's parameters |
141
|
|
|
* |
142
|
|
|
* @param TaskParameters $parameters |
143
|
|
|
* @return Schedule |
144
|
|
|
*/ |
145
|
|
|
public function setParameters(TaskParameters $parameters) { |
146
|
|
|
|
147
|
|
|
$this->parameters = $parameters->get(); |
|
|
|
|
148
|
|
|
|
149
|
|
|
return $this; |
150
|
|
|
|
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* Returns the properties of this object as an array for ease of use |
155
|
|
|
* |
156
|
|
|
* @return array |
157
|
|
|
*/ |
158
|
|
|
public function toArray() { |
159
|
|
|
|
160
|
|
|
return get_object_vars($this); |
161
|
|
|
|
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
} |
165
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths