service-captcha/app/ServiceResults/ServiceResult.php

21 lines
467 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace App\ServiceResults;
use App\Contracts\ServiceResult as ServiceResultContract;
use App\Contracts\ServiceResultError as ServiceResultErrorContract;
abstract class ServiceResult implements ServiceResultContract
{
public function isSuccess(): bool
{
return $this->isError() === false;
}
public function isError(): bool
{
return $this instanceof ServiceResultErrorContract === true;
}
}