1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace AOE\Crawler\Domain\Model; |
6
|
|
|
|
7
|
|
|
/*************************************************************** |
8
|
|
|
* Copyright notice |
9
|
|
|
* |
10
|
|
|
* (c) 2019 AOE GmbH <[email protected]> |
11
|
|
|
* |
12
|
|
|
* All rights reserved |
13
|
|
|
* |
14
|
|
|
* This script is part of the TYPO3 project. The TYPO3 project is |
15
|
|
|
* free software; you can redistribute it and/or modify |
16
|
|
|
* it under the terms of the GNU General Public License as published by |
17
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
18
|
|
|
* (at your option) any later version. |
19
|
|
|
* |
20
|
|
|
* The GNU General Public License can be found at |
21
|
|
|
* http://www.gnu.org/copyleft/gpl.html. |
22
|
|
|
* |
23
|
|
|
* This script is distributed in the hope that it will be useful, |
24
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
25
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26
|
|
|
* GNU General Public License for more details. |
27
|
|
|
* |
28
|
|
|
* This copyright notice MUST APPEAR in all copies of the script! |
29
|
|
|
***************************************************************/ |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Class Reason |
33
|
|
|
* |
34
|
|
|
*/ |
35
|
|
|
class Reason |
36
|
|
|
{ |
37
|
|
|
/** |
38
|
|
|
* THE CONSTANTS REPRESENT THE KIND OF THE REASON |
39
|
|
|
* |
40
|
|
|
* Convention for own states: <extensionkey>_<reason> |
41
|
|
|
*/ |
42
|
|
|
public const REASON_DEFAULT = 'crawler_default_reason'; |
43
|
|
|
public const REASON_GUI_SUBMIT = 'crawler_gui_submit_reason'; |
44
|
|
|
public const REASON_CLI_SUBMIT = 'crawler_cli_submit_reason'; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var array |
48
|
|
|
*/ |
49
|
|
|
protected $row; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param array $row |
53
|
|
|
*/ |
54
|
2 |
|
public function __construct($row = []) |
55
|
|
|
{ |
56
|
2 |
|
$this->row = $row; |
57
|
2 |
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Set uid |
61
|
|
|
* |
62
|
|
|
* @param int uid |
|
|
|
|
63
|
|
|
* @return void |
64
|
|
|
*/ |
65
|
1 |
|
public function setUid($uid): void |
66
|
|
|
{ |
67
|
1 |
|
$this->row['uid'] = $uid; |
68
|
1 |
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return int |
72
|
|
|
*/ |
73
|
1 |
|
public function getUid() |
74
|
|
|
{ |
75
|
1 |
|
return $this->row['uid']; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Method to set a timestamp for the creation time of this record |
80
|
|
|
* |
81
|
|
|
* @param int $time |
82
|
|
|
*/ |
83
|
1 |
|
public function setCreationDate($time): void |
84
|
|
|
{ |
85
|
1 |
|
$this->row['crdate'] = $time; |
86
|
1 |
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return int |
90
|
|
|
*/ |
91
|
1 |
|
public function getCreationDate() |
92
|
|
|
{ |
93
|
1 |
|
return $this->row['crdate']; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* This method can be used to set a user id of the user who has created this reason entry |
98
|
|
|
* |
99
|
|
|
* @param int $user_id |
100
|
|
|
*/ |
101
|
1 |
|
public function setBackendUserId($user_id): void |
102
|
|
|
{ |
103
|
1 |
|
$this->row['cruser_id'] = $user_id; |
104
|
1 |
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return int |
108
|
|
|
*/ |
109
|
1 |
|
public function getBackendUserId() |
110
|
|
|
{ |
111
|
1 |
|
return $this->row['cruser_id']; |
112
|
|
|
} |
113
|
|
|
/** |
114
|
|
|
* Method to set the type of the reason for this reason instance (see constances) |
115
|
|
|
* |
116
|
|
|
* @param string $string |
117
|
|
|
*/ |
118
|
1 |
|
public function setReason($string): void |
119
|
|
|
{ |
120
|
1 |
|
$this->row['reason'] = $string; |
121
|
1 |
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* This method returns the attached reason text. |
125
|
|
|
* |
126
|
|
|
* @return string |
127
|
|
|
*/ |
128
|
1 |
|
public function getReason() |
129
|
|
|
{ |
130
|
1 |
|
return $this->row['reason']; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* This method can be used to assign a detail text to the crawler reason |
135
|
|
|
* |
136
|
|
|
* @param string $detail_text |
137
|
|
|
*/ |
138
|
1 |
|
public function setDetailText($detail_text): void |
139
|
|
|
{ |
140
|
1 |
|
$this->row['detail_text'] = $detail_text; |
141
|
1 |
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* Returns the attachet detail text. |
145
|
|
|
* |
146
|
|
|
* @return string |
147
|
|
|
*/ |
148
|
1 |
|
public function getDetailText() |
149
|
|
|
{ |
150
|
1 |
|
return $this->row['detail_text']; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* This method is used to set the uid of the queue entry |
155
|
|
|
* where the reason is relevant for. |
156
|
|
|
* |
157
|
|
|
* @param int $entry_uid |
158
|
|
|
*/ |
159
|
1 |
|
public function setQueueEntryUid($entry_uid): void |
160
|
|
|
{ |
161
|
1 |
|
$this->row['queue_entry_uid'] = $entry_uid; |
162
|
1 |
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @return int |
166
|
|
|
*/ |
167
|
1 |
|
public function getQueueEntryUid() |
168
|
|
|
{ |
169
|
1 |
|
return $this->row['queue_entry_uid']; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Returns the properties of the object as array |
174
|
|
|
* |
175
|
|
|
* @return array |
176
|
|
|
*/ |
177
|
2 |
|
public function getRow() |
178
|
|
|
{ |
179
|
2 |
|
return $this->row; |
180
|
|
|
} |
181
|
|
|
} |
182
|
|
|
|
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