1 | <?php |
||
13 | class MongoFailedJobProvider implements FailedJobProviderInterface |
||
14 | { |
||
15 | /** |
||
16 | * The database connection name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $database; |
||
21 | |||
22 | /** |
||
23 | * The database table. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $table; |
||
28 | |||
29 | /** |
||
30 | * Create a new database failed job provider. |
||
31 | * |
||
32 | * @param string $database |
||
33 | * @param string $table |
||
34 | */ |
||
35 | public function __construct($database, $table) |
||
40 | |||
41 | /** |
||
42 | * Log a failed job into storage. |
||
43 | * |
||
44 | * @param string $connection |
||
45 | * @param string $queue |
||
46 | * @param string $payload |
||
47 | * @param \Exception $exception |
||
48 | * |
||
49 | * @return int|null|void |
||
50 | */ |
||
51 | public function log($connection, $queue, $payload, $exception) |
||
61 | |||
62 | /** |
||
63 | * Get a list of all of the failed jobs. |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | public function all() |
||
77 | |||
78 | /** |
||
79 | * Get a single failed job. |
||
80 | * |
||
81 | * @param mixed $id |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | public function find($id) |
||
89 | |||
90 | /** |
||
91 | * Delete a single failed job from storage. |
||
92 | * |
||
93 | * @param mixed $id |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function forget($id) |
||
101 | |||
102 | /** |
||
103 | * Flush all of the failed jobs from storage. |
||
104 | */ |
||
105 | public function flush() |
||
109 | |||
110 | /** |
||
111 | * Get a new query builder instance for the table. |
||
112 | * |
||
113 | * @return object mongo collection |
||
114 | */ |
||
115 | protected function getCollection() |
||
119 | } |
||
120 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.