src/Console/BuryCommand.php
public function handle()
    {
        $this->parseArguments();

        $tube = $this->argument('tube') ?: $this->defaultTube;

        if ($this->count > 1) {
            if (! $this->confirmToProceed("You are about to bury $this->count jobs in '$tube' tube.")) {
                return;
            }
        }

        $buried = 0;
        while ($job = $this->reserveJob($tube)) {
            if ($this->count > 0 && $buried >= $this->count) {
                break;
            }

            $this->buryJob($job, $this->priority);

            $buried++;
        }

        if (0 == $buried) {
            $this->renderJobNotFoundMessage($tube, 'ready');
        } else {
            $this->comment("Buried $buried jobs in '$tube' tube.");
        }
    }
public function handle()
    {
        $this->parseArguments();

        $tube = $this->argument('tube') ?: $this->defaultTube;

        if ($this->count > 1) {
            if (! $this->confirmToProceed("You are about to bury $this->count jobs in '$tube' tube.")) {
                return;
            }
        }

        $buried = 0;
        while ($job = $this->reserveJob($tube)) {
            if ($this->count > 0 && $buried >= $this->count) {
                break;
            }

            $this->buryJob($job, $this->priority);

            $buried++;
        }

        if (0 == $buried) {
            $this->renderJobNotFoundMessage($tube, 'ready');
        } else {
            $this->comment("Buried $buried jobs in '$tube' tube.");
        }
    }
{@inheritdoc}