Skip to content

Commit

Permalink
[10.x] Pluralisation typo in queue:clear command output (#47376)
Browse files Browse the repository at this point in the history
* Fixed typo in queue:clear command output

* Update ClearCommand.php

* formatting

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
sebsobseb and taylorotwell authored Jun 8, 2023
1 parent 4ffac6f commit 97ab967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Queue/Console/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Queue\ClearableQueue;
use Illuminate\Support\Str;
use ReflectionClass;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -53,7 +54,7 @@ public function handle()
if ($queue instanceof ClearableQueue) {
$count = $queue->clear($queueName);

$this->components->info('Cleared '.$count.' jobs from the ['.$queueName.'] queue');
$this->components->info('Cleared '.$count.' '.Str::plural('job', $count).' from the ['.$queueName.'] queue');
} else {
$this->components->error('Clearing queues is not supported on ['.(new ReflectionClass($queue))->getShortName().']');
}
Expand Down

0 comments on commit 97ab967

Please sign in to comment.