Skip to content

Commit eaa3d4f

Browse files
committed
Model::$validationRules is not more nullable
1 parent f7bdcf5 commit eaa3d4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Model.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ abstract class Model
106106
*
107107
* @see Validation::setRules
108108
*
109-
* @var array<string,array|string>|null
109+
* @var array<string,array|string>
110110
*/
111-
protected ?array $validationRules = null;
111+
protected array $validationRules;
112112
/**
113113
* The Pager instance.
114114
*
@@ -484,7 +484,7 @@ public function delete(int | string $primaryKey) : int
484484

485485
protected function getValidation() : Validation
486486
{
487-
if ($this->validationRules === null) {
487+
if ( ! isset($this->validationRules)) {
488488
throw new \RuntimeException('Validation rules are not set');
489489
}
490490
return $this->validation

0 commit comments

Comments
 (0)