diff --git a/src/Reason.php b/src/Reason.php index dc2d349..58302b6 100644 --- a/src/Reason.php +++ b/src/Reason.php @@ -50,6 +50,30 @@ class Reason return $this->messages; } + /** + * Checks is status successful. + * + * Shortcut for $this->getStatus()->isSuccess() + * + * @return bool + */ + public function isSuccess(): bool + { + return $this->status->isSuccess(); + } + + /** + * Checks is status failed. + * + * Shortcut for $this->getStatus()->isFail() + * + * @return bool + */ + public function isFail(): bool + { + return $this->status->isFail(); + } + /** * Appends reason to current and returns new reason. *