Skip to content

Commit

Permalink
fix return type of built-in artisan commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rizqyhi committed Nov 17, 2023
1 parent add9451 commit d1373b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Queue/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function __construct(Listener $listener)
/**
* Execute the console command.
*
* @return void
*/
* @return int
*/
public function fire()
{
$this->setListenerOptions();
Expand All @@ -69,6 +69,8 @@ public function fire()
$this->listener->listen(
$connection, $queue, $delay, $memory, $timeout
);

return 0;
}

/**
Expand Down
8 changes: 5 additions & 3 deletions src/Illuminate/Queue/Console/WorkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public function __construct(Worker $worker)
/**
* Execute the console command.
*
* @return void
*/
* @return int
*/
public function fire()
{
if ($this->downForMaintenance() && ! $this->option('daemon')) return;
if ($this->downForMaintenance() && ! $this->option('daemon')) return 0;

$queue = $this->option('queue');

Expand All @@ -73,6 +73,8 @@ public function fire()
{
$this->writeOutput($response['job'], $response['failed']);
}

return 0;
}

/**
Expand Down

0 comments on commit d1373b2

Please sign in to comment.