Updated the project for PHP 7.4+ compatibility.

This commit is contained in:
2026-05-31 12:54:12 +03:30
parent a8a5065553
commit 2703e956da
5 changed files with 23 additions and 18 deletions
+9 -6
View File
@@ -6,7 +6,7 @@ use Dabestaniha\AuthenticateBridge\App\Support\Collection;
abstract class BaseFormRequest
{
public static function make(): static
public static function make(): self
{
return new static();
}
@@ -58,11 +58,14 @@ abstract class BaseFormRequest
protected function validateValue($value, $rule): bool
{
return match ($rule) {
'required' => !empty($value),
'nullable' => true,
default => false,
};
switch ($rule) {
case 'required':
return !empty($value);
case 'nullable':
return true;
default:
return false;
}
}