Version 0.7.0 #1
@ -6,4 +6,5 @@ namespace App\Contracts;
|
||||
interface ServiceResult
|
||||
{
|
||||
public function isSuccess(): bool;
|
||||
public function isError(): bool;
|
||||
}
|
||||
|
@ -10,6 +10,11 @@ abstract class ServiceResult implements ServiceResultContract
|
||||
{
|
||||
public function isSuccess(): bool
|
||||
{
|
||||
return $this instanceof ServiceResultErrorContract !== true;
|
||||
return $this->isError() === false;
|
||||
}
|
||||
|
||||
public function isError(): bool
|
||||
{
|
||||
return $this instanceof ServiceResultErrorContract === true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user