33namespace SimpleSoftwareIO \SqsDisk ;
44
55use Aws \Sqs \SqsClient ;
6+ use DateInterval ;
7+ use DateTimeInterface ;
8+ use Illuminate \Contracts \Queue \Job ;
69use Illuminate \Support \Arr ;
710use Illuminate \Queue \SqsQueue ;
811
@@ -17,50 +20,22 @@ class SqsDiskQueue extends SqsQueue
1720 */
1821 public const MAX_SQS_LENGTH = 250000 ;
1922
20- /**
21- * The Amazon SQS instance.
22- *
23- * @var \Aws\Sqs\SqsClient
24- */
25- protected $ sqs ;
26-
27- /**
28- * The name of the default queue.
29- *
30- * @var string
31- */
32- protected $ default ;
33-
3423 /**
3524 * The disk options to save large payloads.
3625 *
3726 * @var array
3827 */
39- protected $ diskOptions ;
40-
41- /**
42- * The queue URL prefix.
43- *
44- * @var string
45- */
46- protected $ prefix ;
47-
48- /**
49- * The queue name suffix.
50- *
51- * @var string
52- */
53- private $ suffix ;
28+ protected array $ diskOptions ;
5429
5530 /**
5631 * Create a new Amazon SQS queue instance.
5732 *
58- * @param \Aws\Sqs\ SqsClient $sqs
33+ * @param SqsClient $sqs
5934 * @param string $default
6035 * @param array $diskOptions
6136 * @param string $prefix
6237 * @param string $suffix
63- * @param bool $dispatchAfterCommit
38+ * @param bool $dispatchAfterCommit
6439 *
6540 * @return void
6641 */
@@ -72,12 +47,9 @@ public function __construct(
7247 $ suffix = '' ,
7348 $ dispatchAfterCommit = false ,
7449 ) {
75- $ this ->sqs = $ sqs ;
76- $ this ->default = $ default ;
7750 $ this ->diskOptions = $ diskOptions ;
78- $ this ->prefix = $ prefix ;
79- $ this ->suffix = $ suffix ;
80- $ this ->dispatchAfterCommit = $ dispatchAfterCommit ;
51+
52+ parent ::__construct ($ sqs , $ default , $ prefix , $ suffix , $ dispatchAfterCommit );
8153 }
8254
8355 /**
@@ -115,7 +87,7 @@ public function pushRaw($payload, $queue = null, array $options = [], $delay = 0
11587 /**
11688 * Push a new job onto the queue after a delay.
11789 *
118- * @param \ DateTimeInterface|\ DateInterval|int $delay
90+ * @param DateTimeInterface|DateInterval|int $delay
11991 * @param string $job
12092 * @param mixed $data
12193 * @param string|null $queue
@@ -140,7 +112,7 @@ function ($payload, $queue) use ($delay) {
140112 *
141113 * @param string|null $queue
142114 *
143- * @return \Illuminate\Contracts\Queue\ Job|null
115+ * @return Job|null
144116 */
145117 public function pop ($ queue = null )
146118 {
@@ -162,7 +134,7 @@ public function pop($queue = null)
162134 }
163135
164136 /**
165- * Delete all of the jobs from the queue.
137+ * Delete all the jobs from the queue.
166138 *
167139 * @param string $queue
168140 *
0 commit comments