diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 7c60780cc31e..873cd7492294 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -33,7 +33,7 @@ ]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', - 'count' => 15, + 'count' => 14, 'path' => __DIR__ . '/system/BaseModel.php', ]; $ignoreErrors[] = [ diff --git a/system/BaseModel.php b/system/BaseModel.php index a51ae1efbbe6..4a34fe18fb27 100644 --- a/system/BaseModel.php +++ b/system/BaseModel.php @@ -1463,7 +1463,7 @@ public function validate($data): bool $rules = $this->getValidationRules(); - if (empty($rules)) { + if ($rules === []) { return true; }