Skip to content

Commit 73c5fbd

Browse files
authored
Merge pull request #24 from techmahedy/techmahedy-1.x
console command handle() method dependency injection:
2 parents 8db8d11 + 52f4fea commit 73c5fbd

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

src/Commands/MakeJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MakeJobCommand extends Command
2525
*
2626
* @return int
2727
*/
28-
protected function handle(): int
28+
public function handle(): int
2929
{
3030
return $this->executeWithTiming(function () {
3131
$name = $this->argument('name');

src/Commands/QueueFailedCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Doppar\Queue\Commands;
44

55
use Phaseolies\Console\Schedule\Command;
6-
use Doppar\Queue\QueueManager;
76
use Doppar\Queue\Models\FailedJob;
87

98
class QueueFailedCommand extends Command
@@ -28,7 +27,7 @@ class QueueFailedCommand extends Command
2827
*
2928
* @return int
3029
*/
31-
protected function handle(): int
30+
public function handle(): int
3231
{
3332
$failedJobs = FailedJob::orderBy('failed_at', 'desc')->get();
3433

src/Commands/QueueFlushCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Doppar\Queue\Commands;
44

55
use Phaseolies\Console\Schedule\Command;
6-
use Doppar\Queue\QueueManager;
76
use Doppar\Queue\Models\FailedJob;
87

98
class QueueFlushCommand extends Command
@@ -28,7 +27,7 @@ class QueueFlushCommand extends Command
2827
*
2928
* @return int
3029
*/
31-
protected function handle(): int
30+
public function handle(): int
3231
{
3332
$id = $this->option('id');
3433

src/Commands/QueueMonitorCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class QueueMonitorCommand extends Command
2727
*
2828
* @return int
2929
*/
30-
protected function handle(): int
30+
public function handle(): int
3131
{
3232
$queues = QueueJob::groupBy('queue')->pluck('queue');
3333

src/Commands/QueueRetryCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QueueRetryCommand extends Command
2828
*
2929
* @return int
3030
*/
31-
protected function handle(): int
31+
public function handle(): int
3232
{
3333
$id = $this->option('id');
3434
$manager = app(QueueManager::class);

src/Commands/QueueRunCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(QueueManager $manager)
5454
*
5555
* @return int
5656
*/
57-
protected function handle(): int
57+
public function handle(): int
5858
{
5959
return $this->withTiming(function () {
6060
$queue = $this->option('queue', 'default');

0 commit comments

Comments
 (0)