| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class InvalidStatusException extends InvalidArgumentException implements FriendlyExceptionInterface |
||
| 12 | { |
||
| 13 | private int $status; |
||
| 14 | |||
| 15 | 1 | public function __construct(int $status, string $message = '', int $code = 0, Throwable $previous = null) |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function getName(): string |
|
| 25 | { |
||
| 26 | 1 | return 'Invalid job status provided'; |
|
| 27 | } |
||
| 28 | |||
| 29 | public function getSolution(): ?string |
||
| 30 | { |
||
| 31 | return <<<SOLUTION |
||
| 32 | Default available status values are: |
||
| 33 | [1] JobStatus::WAITING |
||
| 34 | [2] JobStatus::RESERVED |
||
| 35 | [3] JobStatus::DONE |
||
| 36 | |||
| 37 | Please consider using one of them or extending \Yiisoft\Queue\Enum\JobStatus class with your ows values. |
||
| 38 | SOLUTION; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get the wrong status value |
||
| 43 | */ |
||
| 44 | 1 | public function getStatus(): int |
|
| 47 | } |
||
| 48 | } |
||
| 49 |