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 Job $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) |
||
163 | |||
164 | /** |
||
165 | * Determine if the job was released back into the queue. |
||
166 | * |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function isReleased(): bool |
||
173 | |||
174 | /** |
||
175 | * Determine if the job has been deleted or released. |
||
176 | * |
||
177 | * @return bool |
||
178 | */ |
||
179 | public function isDeletedOrReleased(): bool |
||
183 | |||
184 | /** |
||
185 | * Determine if the job has been marked as a failure. |
||
186 | * |
||
187 | * @return bool |
||
188 | */ |
||
189 | public function hasFailed(): bool |
||
193 | |||
194 | /** |
||
195 | * Mark the job as "failed". |
||
196 | * |
||
197 | * @return void |
||
198 | */ |
||
199 | public function markAsFailed() |
||
203 | |||
204 | /** |
||
205 | * Get the decoded body of the job. |
||
206 | * |
||
207 | * @return array |
||
208 | */ |
||
209 | public function payload(): array |
||
213 | |||
214 | /** |
||
215 | * Get the number of times to attempt a job. |
||
216 | * |
||
217 | * @return int|null |
||
218 | */ |
||
219 | public function maxTries(): ?int |
||
223 | |||
224 | /** |
||
225 | * Get the number of seconds the job can run. |
||
226 | * |
||
227 | * @return int|null |
||
228 | */ |
||
229 | public function timeout(): ?int |
||
233 | |||
234 | /** |
||
235 | * Get the timestamp indicating when the job should timeout. |
||
236 | * |
||
237 | * @return int|null |
||
238 | */ |
||
239 | public function timeoutAt(): ?int |
||
243 | |||
244 | /** |
||
245 | * Get the name of the queued job class. |
||
246 | * |
||
247 | * @return string |
||
248 | */ |
||
249 | public function getName(): string |
||
253 | |||
254 | /** |
||
255 | * Get data of queued job. |
||
256 | * |
||
257 | * @return array |
||
258 | */ |
||
259 | public function getData(): array |
||
263 | |||
264 | /** |
||
265 | * Get the name of the connection the job belongs to. |
||
266 | * |
||
267 | * @return string |
||
268 | */ |
||
269 | public function getConnectionName(): ?string |
||
273 | |||
274 | /** |
||
275 | * Get the name of the queue the job belongs to. |
||
276 | * |
||
277 | * @return string |
||
278 | */ |
||
279 | public function getQueue(): ?string |
||
283 | |||
284 | /** |
||
285 | * Get the number of times the job has been attempted. |
||
286 | * |
||
287 | * @return int |
||
288 | */ |
||
289 | public function attempts(): int |
||
293 | |||
294 | /** |
||
295 | * Check if job reserved |
||
296 | * |
||
297 | * @return bool |
||
298 | */ |
||
299 | public function reserved(): bool |
||
303 | |||
304 | /** |
||
305 | * Get reserved at time |
||
306 | * |
||
307 | * @return int|null |
||
308 | */ |
||
309 | public function reservedAt(): ?int |
||
313 | |||
314 | /** |
||
315 | * Get the job identifier. |
||
316 | * |
||
317 | * @return string |
||
318 | */ |
||
319 | public function getJobId(): string |
||
323 | |||
324 | /** |
||
325 | * Get the raw body string for the job. |
||
326 | * |
||
327 | * @return string |
||
328 | */ |
||
329 | public function getRawBody(): string |
||
333 | |||
334 | /** |
||
335 | * Resolve job |
||
336 | * |
||
337 | * @param string $class |
||
338 | * |
||
339 | * @return JobInterface |
||
340 | */ |
||
341 | protected function resolve(string $class): JobInterface |
||
345 | } |
||
346 |
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.