1 | <?php |
||
17 | abstract class JobContract implements JobContractInterface |
||
18 | { |
||
19 | use InteractWithTimeTrait; |
||
20 | |||
21 | /** |
||
22 | * The job handler instance. |
||
23 | * |
||
24 | * @var JobInterface |
||
25 | */ |
||
26 | protected $instance; |
||
27 | |||
28 | /** |
||
29 | * Indicates if the job has been deleted. |
||
30 | * |
||
31 | * @var bool |
||
32 | */ |
||
33 | protected $deleted = false; |
||
34 | |||
35 | /** |
||
36 | * Indicates if the job has been released. |
||
37 | * |
||
38 | * @var bool |
||
39 | */ |
||
40 | protected $released = false; |
||
41 | |||
42 | /** |
||
43 | * Indicates if the job has failed. |
||
44 | * |
||
45 | * @var bool |
||
46 | */ |
||
47 | protected $failed = false; |
||
48 | |||
49 | /** |
||
50 | * The name of the connection the job belongs to. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $connectionName; |
||
55 | |||
56 | /** |
||
57 | * The name of the queue the job belongs to. |
||
58 | * |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $queue; |
||
62 | |||
63 | /** |
||
64 | * Fire the job. |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function fire() |
||
74 | |||
75 | /** |
||
76 | * Delete the job from the queue. |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function delete() |
||
84 | |||
85 | /** |
||
86 | * Determine if the job has been deleted. |
||
87 | * |
||
88 | * @return bool |
||
89 | */ |
||
90 | public function isDeleted(): bool |
||
94 | |||
95 | /** |
||
96 | * Release the job back into the queue. |
||
97 | * |
||
98 | * @param int $delay |
||
99 | * |
||
100 | * @return void |
||
101 | */ |
||
102 | public function release(int $delay = 0) |
||
106 | |||
107 | /** |
||
108 | * Determine if the job was released back into the queue. |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | public function isReleased(): bool |
||
116 | |||
117 | /** |
||
118 | * Determine if the job has been deleted or released. |
||
119 | * |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function isDeletedOrReleased(): bool |
||
126 | |||
127 | /** |
||
128 | * Determine if the job has been marked as a failure. |
||
129 | * |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function hasFailed(): bool |
||
136 | |||
137 | /** |
||
138 | * Mark the job as "failed". |
||
139 | * |
||
140 | * @return void |
||
141 | */ |
||
142 | public function markAsFailed() |
||
146 | |||
147 | /** |
||
148 | * Process an exception that caused the job to fail. |
||
149 | * |
||
150 | * @param Exception $e |
||
151 | * |
||
152 | * @return void |
||
153 | */ |
||
154 | public function failed($e) |
||
162 | |||
163 | /** |
||
164 | * Get the decoded body of the job. |
||
165 | * |
||
166 | * @return array |
||
167 | */ |
||
168 | public function payload(): array |
||
172 | |||
173 | /** |
||
174 | * Get the number of times to attempt a job. |
||
175 | * |
||
176 | * @return int|null |
||
177 | */ |
||
178 | public function maxTries(): ?int |
||
182 | |||
183 | /** |
||
184 | * Get the number of seconds the job can run. |
||
185 | * |
||
186 | * @return int|null |
||
187 | */ |
||
188 | public function timeout(): ?int |
||
192 | |||
193 | /** |
||
194 | * Get the timestamp indicating when the job should timeout. |
||
195 | * |
||
196 | * @return int|null |
||
197 | */ |
||
198 | public function timeoutAt(): ?int |
||
202 | |||
203 | /** |
||
204 | * Get the name of the queued job class. |
||
205 | * |
||
206 | * @return string |
||
207 | */ |
||
208 | public function getName(): string |
||
212 | |||
213 | /** |
||
214 | * Get data of queued job. |
||
215 | * |
||
216 | * @return array |
||
217 | */ |
||
218 | public function getData(): array |
||
222 | |||
223 | /** |
||
224 | * Get the name of the connection the job belongs to. |
||
225 | * |
||
226 | * @return string |
||
227 | */ |
||
228 | public function getConnectionName(): ?string |
||
232 | |||
233 | /** |
||
234 | * Get the name of the queue the job belongs to. |
||
235 | * |
||
236 | * @return string |
||
237 | */ |
||
238 | public function getQueue(): ?string |
||
242 | |||
243 | /** |
||
244 | * Get the job identifier. |
||
245 | * |
||
246 | * @return string |
||
247 | */ |
||
248 | abstract public function getJobId(): string; |
||
249 | |||
250 | /** |
||
251 | * Get the raw body of the job. |
||
252 | * |
||
253 | * @return string |
||
254 | */ |
||
255 | abstract public function getRawBody(): string; |
||
256 | |||
257 | /** |
||
258 | * Resolve the given class |
||
259 | * |
||
260 | * @param string $class |
||
261 | * |
||
262 | * @return JobInterface |
||
263 | */ |
||
264 | abstract protected function resolve(string $class): JobInterface; |
||
265 | } |
||
266 |
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.