1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Doctrs\SonataImportBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* ImportLog |
9
|
|
|
* |
10
|
|
|
* @ORM\Table("ext_sonata_import_log") |
11
|
|
|
* @ORM\Entity(repositoryClass="Doctrs\SonataImportBundle\Repository\DefaultRepository") |
12
|
|
|
* @ORM\HasLifecycleCallbacks() |
13
|
|
|
*/ |
14
|
|
|
class ImportLog |
15
|
|
|
{ |
16
|
|
|
const STATUS_SUCCESS = 1; |
17
|
|
|
const STATUS_EXISTS = 2; |
18
|
|
|
const STATUS_ERROR = 3; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var integer |
22
|
|
|
* |
23
|
|
|
* @ORM\Column(name="id", type="integer") |
24
|
|
|
* @ORM\Id |
25
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
26
|
|
|
*/ |
27
|
|
|
private $id; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var \DateTime |
31
|
|
|
* |
32
|
|
|
* @ORM\Column(name="ts", type="datetime") |
33
|
|
|
*/ |
34
|
|
|
private $ts; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var integer |
38
|
|
|
* |
39
|
|
|
* @ORM\Column(name="status", type="integer") |
40
|
|
|
*/ |
41
|
|
|
private $status; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
* |
46
|
|
|
* @ORM\Column(name="message", type="text", nullable=true) |
47
|
|
|
*/ |
48
|
|
|
private $message; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
* |
53
|
|
|
* @ORM\Column(name="line", type="string", length=255) |
54
|
|
|
*/ |
55
|
|
|
private $line; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var string |
59
|
|
|
* |
60
|
|
|
* @ORM\ManyToOne(targetEntity="Doctrs\SonataImportBundle\Entity\UploadFile", inversedBy="importLog") |
61
|
|
|
*/ |
62
|
|
|
private $uploadFile; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var integer |
66
|
|
|
* |
67
|
|
|
* @ORM\Column(name="foreign_id", type="integer", nullable=true) |
68
|
|
|
*/ |
69
|
|
|
private $foreignId; |
70
|
|
|
|
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Get id |
74
|
|
|
* |
75
|
|
|
* @return integer |
76
|
|
|
*/ |
77
|
|
|
public function getId() |
78
|
|
|
{ |
79
|
|
|
return $this->id; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Get ts |
84
|
|
|
* |
85
|
|
|
* @return \DateTime |
86
|
|
|
*/ |
87
|
|
|
public function getTs() |
88
|
|
|
{ |
89
|
|
|
return $this->ts; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Set status |
94
|
|
|
* |
95
|
|
|
* @param integer $status |
96
|
|
|
* @return ImportLog |
97
|
|
|
*/ |
98
|
|
|
public function setStatus($status) |
99
|
|
|
{ |
100
|
|
|
$this->status = $status; |
101
|
|
|
|
102
|
|
|
return $this; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Get status |
107
|
|
|
* |
108
|
|
|
* @return integer |
109
|
|
|
*/ |
110
|
|
|
public function getStatus() |
111
|
|
|
{ |
112
|
|
|
return $this->status; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* Set message |
117
|
|
|
* |
118
|
|
|
* @param string $message |
119
|
|
|
* @return ImportLog |
120
|
|
|
*/ |
121
|
|
|
public function setMessage($message) |
122
|
|
|
{ |
123
|
|
|
$this->message = $message; |
124
|
|
|
|
125
|
|
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Get message |
130
|
|
|
* |
131
|
|
|
* @return string |
132
|
|
|
*/ |
133
|
|
|
public function getMessage() |
134
|
|
|
{ |
135
|
|
|
return $this->message; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return mixed |
140
|
|
|
*/ |
141
|
|
|
public function messageEncode() { |
142
|
|
|
return json_decode($this->message); |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* Set line |
147
|
|
|
* |
148
|
|
|
* @param string $line |
149
|
|
|
* @return ImportLog |
150
|
|
|
*/ |
151
|
|
|
public function setLine($line) |
152
|
|
|
{ |
153
|
|
|
$this->line = $line; |
154
|
|
|
|
155
|
|
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Get line |
160
|
|
|
* |
161
|
|
|
* @return string |
162
|
|
|
*/ |
163
|
|
|
public function getLine() |
164
|
|
|
{ |
165
|
|
|
return $this->line; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* Set uploadFile |
170
|
|
|
* |
171
|
|
|
* @param string $uploadFile |
172
|
|
|
* @return ImportLog |
173
|
|
|
*/ |
174
|
|
|
public function setUploadFile($uploadFile) |
175
|
|
|
{ |
176
|
|
|
$this->uploadFile = $uploadFile; |
177
|
|
|
|
178
|
|
|
return $this; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* Get uploadFile |
183
|
|
|
* |
184
|
|
|
* @return string |
185
|
|
|
*/ |
186
|
|
|
public function getUploadFile() |
187
|
|
|
{ |
188
|
|
|
return $this->uploadFile; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* @ORM\PreUpdate() |
194
|
|
|
* @ORM\PrePersist() |
195
|
|
|
*/ |
196
|
|
|
public function prePersistUpdate() { |
197
|
|
|
$this->ts = new \DateTime(); |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* @param $foreignId |
202
|
|
|
* @return ImportLog |
203
|
|
|
*/ |
204
|
|
|
public function setForeignId($foreignId) { |
205
|
|
|
$this->foreignId = $foreignId; |
206
|
|
|
|
207
|
|
|
return $this; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* @return int |
212
|
|
|
*/ |
213
|
|
|
public function getForeignId() { |
214
|
|
|
return $this->foreignId; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* @return string |
219
|
|
|
*/ |
220
|
|
|
public function __toString() { |
221
|
|
|
return (string)$this->message; |
222
|
|
|
} |
223
|
|
|
} |
224
|
|
|
|
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