Total Complexity | 7 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
8 | class SyncConnection implements ConnectionInterface { |
||
9 | /** |
||
10 | * Execute the job immediately without pushing to the queue. |
||
11 | * |
||
12 | * @param Job $job |
||
13 | * @param int $delay |
||
14 | * |
||
15 | * @return bool|int |
||
16 | */ |
||
17 | public function push(Job $job, $delay = 0) { |
||
18 | $job->handle(); |
||
19 | |||
20 | return true; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Retrieve a job from the queue. |
||
25 | * |
||
26 | * @return bool|Job |
||
27 | */ |
||
28 | public function pop() { |
||
29 | return false; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Delete a job from the queue. |
||
34 | * |
||
35 | * @param Job $job |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function delete($job) { |
||
40 | return false; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Release a job back onto the queue. |
||
45 | * |
||
46 | * @param Job $job |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function release($job) { |
||
51 | return false; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * Push a job onto the failure queue. |
||
56 | * |
||
57 | * @param Job $job |
||
58 | * @param Exception $exception |
||
59 | * |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function failure($job, Exception $exception) { |
||
63 | return false; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Get total jobs in the queue. |
||
68 | * |
||
69 | * @return int |
||
70 | */ |
||
71 | public function jobs() { |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Get total jobs in the failures queue. |
||
77 | * |
||
78 | * @return int |
||
79 | */ |
||
80 | public function failed_jobs() { |
||
82 | } |
||
83 | } |
||
84 |