File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1313
1414namespace CodeIgniter \Queue ;
1515
16+ /**
17+ * Represents the result of a queue push operation.
18+ */
1619class QueuePushResult
1720{
1821 public function __construct (
@@ -22,26 +25,41 @@ public function __construct(
2225 ) {
2326 }
2427
28+ /**
29+ * Creates a successful push result.
30+ */
2531 public static function success (int $ jobId ): self
2632 {
2733 return new self (true , $ jobId );
2834 }
2935
36+ /**
37+ * Creates a failed push result.
38+ */
3039 public static function failure (?string $ error = null ): self
3140 {
3241 return new self (false , null , $ error );
3342 }
3443
44+ /**
45+ * Returns whether the push operation was successful.
46+ */
3547 public function getStatus (): bool
3648 {
3749 return $ this ->success ;
3850 }
3951
52+ /**
53+ * Returns the job ID if the push was successful, null otherwise.
54+ */
4055 public function getJobId (): ?int
4156 {
4257 return $ this ->jobId ;
4358 }
4459
60+ /**
61+ * Returns the error message if the push failed, null otherwise.
62+ */
4563 public function getError (): ?string
4664 {
4765 return $ this ->error ;
You can’t perform that action at this time.
0 commit comments