PHP 8.3.31
Preview: Skip.php Size: 870 B
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Queue/Middleware/Skip.php

<?php

namespace Illuminate\Queue\Middleware;

use Closure;

class Skip
{
    public function __construct(protected bool $skip = false)
    {
    }

    /**
     * Apply the middleware if the given condition is truthy.
     *
     * @param  bool|Closure(): bool  $condition
     */
    public static function when(Closure|bool $condition): self
    {
        return new self(value($condition));
    }

    /**
     * Apply the middleware unless the given condition is truthy.
     *
     * @param  bool|Closure(): bool  $condition
     */
    public static function unless(Closure|bool $condition): self
    {
        return new self(! value($condition));
    }

    /**
     * Handle the job.
     */
    public function handle(mixed $job, callable $next): mixed
    {
        if ($this->skip) {
            return false;
        }

        return $next($job);
    }
}

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
3.33 KB lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
2.45 KB lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
870 B lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
383 B lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
4.91 KB lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
1.62 KB lrw-rw-rw- 2025-09-17 06:52:57
Edit Download
3.45 KB lrw-rw-rw- 2025-09-17 06:52:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).