PHP 8.3.31
Preview: FormStep.php Size: 1.32 KB
/home/getspomw/royalsquad.us/vendor/laravel/prompts/src/FormStep.php

<?php

namespace Laravel\Prompts;

use Closure;

class FormStep
{
    protected readonly Closure $condition;

    public function __construct(
        protected readonly Closure $step,
        bool|Closure $condition,
        public readonly ?string $name,
        protected readonly bool $ignoreWhenReverting,
    ) {
        $this->condition = is_bool($condition)
            ? fn () => $condition
            : $condition;
    }

    /**
     * Execute this step.
     *
     * @param  array<mixed>  $responses
     */
    public function run(array $responses, mixed $previousResponse): mixed
    {
        if (! $this->shouldRun($responses)) {
            return null;
        }

        return ($this->step)($responses, $previousResponse);
    }

    /**
     * Whether the step should run based on the given condition.
     *
     * @param  array<mixed>  $responses
     */
    protected function shouldRun(array $responses): bool
    {
        return ($this->condition)($responses);
    }

    /**
     * Whether this step should be skipped over when a subsequent step is reverted.
     *
     * @param  array<mixed>  $responses
     */
    public function shouldIgnoreWhenReverting(array $responses): bool
    {
        if (! $this->shouldRun($responses)) {
            return true;
        }

        return $this->ignoreWhenReverting;
    }
}

Directory Contents

Dirs: 5 × Files: 22

Name Size Perms Modified Actions
Concerns DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
Output DIR
- drwxrwxrwx 2026-04-21 16:06:43
Edit Download
Support DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
Themes DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
602 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.36 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
13.51 KB lrw-r--r-- 2026-04-26 08:25:40
Edit Download
9.58 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.32 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
7.89 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.77 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
6.15 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.13 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
702 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.00 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
568 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.59 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
10.87 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.03 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.25 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.24 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.97 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.58 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
2.43 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
6.94 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
885 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download

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