One Hat Cyber Team
Your IP :
172.70.50.39
Server IP :
188.114.97.7
Server :
Linux advantage-project 5.14.0-503.26.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 19 16:28:19 UTC 2025 x86_64
Server Software :
Apache/2.4.62 (Rocky Linux) OpenSSL/3.2.2
PHP Version :
8.3.17
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
htmlOld
/
vendor
/
laravel
/
prompts
/
src
/
View File Name :
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; } }