| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Exceptions; |
| 4 |
|
| 5 |
use App\Billingo\Service\SelfTest; |
| 6 |
use Exception; |
| 7 |
|
| 8 |
class BadContentException extends BillingoException |
| 9 |
{ |
| 10 |
|
| 11 |
public function __construct( |
| 12 |
private readonly SelfTest $selfTest, |
| 13 |
int $code = 0, |
| 14 |
Exception $previous = null |
| 15 |
) { |
| 16 |
parent::__construct($code, $previous); |
| 17 |
} |
| 18 |
public function getErrorMessage(): string |
| 19 |
{ |
| 20 |
return 'Bad Content'; |
| 21 |
} |
| 22 |
|
| 23 |
public function getSelfTest(): SelfTest |
| 24 |
{ |
| 25 |
return $this->selfTest; |
| 26 |
} |
| 27 |
|
| 28 |
public function getErrors(): ?array |
| 29 |
{ |
| 30 |
return $this->selfTest->getErrors(); |
| 31 |
} |
| 32 |
} |
| 33 |
|