Add isSuccess and isFail shortcuts
This commit is contained in:
parent
8a60c82bc6
commit
4268ea02d3
@ -50,6 +50,30 @@ class Reason
|
|||||||
return $this->messages;
|
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.
|
* Appends reason to current and returns new reason.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user