diff --git a/src/ValidationResult.php b/src/ValidationResult.php index 08ca63f..23bd019 100644 --- a/src/ValidationResult.php +++ b/src/ValidationResult.php @@ -33,11 +33,17 @@ public function error(): ?ValidationError return $this->error; } + /** + * @phpstan-assert-if-true null $this->error + */ public function isValid(): bool { return $this->error === null; } + /** + * @phpstan-assert-if-true ValidationError $this->error + */ public function hasError(): bool { return $this->error !== null;