1 | <?php |
||
20 | class JobContract implements JobContractInterface |
||
21 | { |
||
22 | use InteractWithTimeTrait; |
||
23 | |||
24 | /** |
||
25 | * The job handler instance. |
||
26 | * |
||
27 | * @var JobInterface |
||
28 | */ |
||
29 | protected $instance; |
||
30 | |||
31 | /** |
||
32 | * Indicates if the job has been deleted. |
||
33 | * |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $deleted = false; |
||
37 | |||
38 | /** |
||
39 | * Indicates if the job has been released. |
||
40 | * |
||
41 | * @var bool |
||
42 | */ |
||
43 | protected $released = false; |
||
44 | |||
45 | /** |
||
46 | * Indicates if the job has failed. |
||
47 | * |
||
48 | * @var bool |
||
49 | */ |
||
50 | protected $failed = false; |
||
51 | |||
52 | /** |
||
53 | * The name of the connection the job belongs to. |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $connectionName; |
||
58 | |||
59 | /** |
||
60 | * The name of the queue the job belongs to. |
||
61 | * |
||
62 | * @var string |
||
63 | */ |
||
64 | protected $queue; |
||
65 | |||
66 | /** |
||
67 | * Job resolver |
||
68 | * |
||
69 | * @var JobResolverInterface |
||
70 | */ |
||
71 | protected $resolver; |
||
72 | |||
73 | /** |
||
74 | * The database queue instance. |
||
75 | * |
||
76 | * @var QueueInterface |
||
77 | */ |
||
78 | protected $database; |
||
79 | |||
80 | /** |
||
81 | * The database job payload. |
||
82 | * |
||
83 | * @var Job |
||
84 | */ |
||
85 | protected $job; |
||
86 | |||
87 | /** |
||
88 | * Create a new job instance. |
||
89 | * |
||
90 | * @param JobResolverInterface $resolver |
||
91 | * @param QueueInterface $database |
||
92 | * @param StdClass|MongoDB\Model\BSONDocument $job |
||
93 | */ |
||
94 | public function __construct(JobResolverInterface $resolver, QueueInterface $database, Job $job) |
||
100 | |||
101 | /** |
||
102 | * Fire the job. |
||
103 | * |
||
104 | * @return void |
||
105 | */ |
||
106 | public function fire() |
||
112 | |||
113 | /** |
||
114 | * Delete the job from the queue. |
||
115 | */ |
||
116 | public function delete() |
||
122 | |||
123 | /** |
||
124 | * Process an exception that caused the job to fail. |
||
125 | * |
||
126 | * @param Exception $e |
||
127 | * |
||
128 | * @return void |
||
129 | */ |
||
130 | public function failed($e) |
||
138 | |||
139 | /** |
||
140 | * Determine if the job has been deleted. |
||
141 | * |
||
142 | * @return bool |
||
143 | */ |
||
144 | public function isDeleted(): bool |
||
148 | |||
149 | /** |
||
150 | * Release the job back into the queue. |
||
151 | * |
||
152 | * @param int $delay |
||
153 | * |
||
154 | * @return void |
||
155 | */ |
||
156 | public function release(int $delay = 0) |
||
160 | |||
161 | /** |
||
162 | * Determine if the job was released back into the queue. |
||
163 | * |
||
164 | * @return bool |
||
165 | */ |
||
166 | public function isReleased(): bool |
||
170 | |||
171 | /** |
||
172 | * Determine if the job has been deleted or released. |
||
173 | * |
||
174 | * @return bool |
||
175 | */ |
||
176 | public function isDeletedOrReleased(): bool |
||
180 | |||
181 | /** |
||
182 | * Determine if the job has been marked as a failure. |
||
183 | * |
||
184 | * @return bool |
||
185 | */ |
||
186 | public function hasFailed(): bool |
||
190 | |||
191 | /** |
||
192 | * Mark the job as "failed". |
||
193 | * |
||
194 | * @return void |
||
195 | */ |
||
196 | public function markAsFailed() |
||
200 | |||
201 | /** |
||
202 | * Get the decoded body of the job. |
||
203 | * |
||
204 | * @return array |
||
205 | */ |
||
206 | public function payload(): array |
||
210 | |||
211 | /** |
||
212 | * Get the number of times to attempt a job. |
||
213 | * |
||
214 | * @return int|null |
||
215 | */ |
||
216 | public function maxTries(): ?int |
||
220 | |||
221 | /** |
||
222 | * Get the number of seconds the job can run. |
||
223 | * |
||
224 | * @return int|null |
||
225 | */ |
||
226 | public function timeout(): ?int |
||
230 | |||
231 | /** |
||
232 | * Get the timestamp indicating when the job should timeout. |
||
233 | * |
||
234 | * @return int|null |
||
235 | */ |
||
236 | public function timeoutAt(): ?int |
||
240 | |||
241 | /** |
||
242 | * Get the name of the queued job class. |
||
243 | * |
||
244 | * @return string |
||
245 | */ |
||
246 | public function getName(): string |
||
250 | |||
251 | /** |
||
252 | * Get data of queued job. |
||
253 | * |
||
254 | * @return array |
||
255 | */ |
||
256 | public function getData(): array |
||
260 | |||
261 | /** |
||
262 | * Get the name of the connection the job belongs to. |
||
263 | * |
||
264 | * @return string |
||
265 | */ |
||
266 | public function getConnectionName(): ?string |
||
270 | |||
271 | /** |
||
272 | * Get the name of the queue the job belongs to. |
||
273 | * |
||
274 | * @return string |
||
275 | */ |
||
276 | public function getQueue(): ?string |
||
280 | |||
281 | /** |
||
282 | * Get the number of times the job has been attempted. |
||
283 | * |
||
284 | * @return int |
||
285 | */ |
||
286 | public function attempts(): int |
||
290 | |||
291 | /** |
||
292 | * Check if job reserved |
||
293 | * |
||
294 | * @return bool |
||
295 | */ |
||
296 | public function reserved(): bool |
||
300 | |||
301 | /** |
||
302 | * Get reserved at time |
||
303 | * |
||
304 | * @return int |
||
305 | */ |
||
306 | public function reservedAt(): int |
||
310 | |||
311 | /** |
||
312 | * Get the job identifier. |
||
313 | * |
||
314 | * @return string |
||
315 | */ |
||
316 | public function getJobId(): string |
||
320 | |||
321 | /** |
||
322 | * Get the raw body string for the job. |
||
323 | * |
||
324 | * @return string |
||
325 | */ |
||
326 | public function getRawBody(): string |
||
330 | |||
331 | /** |
||
332 | * Resolve job |
||
333 | * |
||
334 | * @param string $class |
||
335 | * |
||
336 | * @return JobInterface |
||
337 | */ |
||
338 | protected function resolve(string $class): JobInterface |
||
342 | } |
||
343 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.