Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class ChannelIncorrectlyConfigured extends InvalidArgumentException implements FriendlyExceptionInterface |
||
14 | { |
||
15 | private string $channel; |
||
16 | |||
17 | /** |
||
18 | * ChannelIncorrectlyConfigured constructor. |
||
19 | * |
||
20 | * @param mixed|object $definition |
||
21 | * @param Throwable|null $previous |
||
22 | */ |
||
23 | 1 | public function __construct(string $channel, $definition, int $code = 0, ?Throwable $previous = null) |
|
24 | { |
||
25 | 1 | $adapterClass = AdapterInterface::class; |
|
26 | 1 | $realType = get_debug_type($definition); |
|
27 | 1 | $message = "Channel \"$channel\" is not properly configured: definition must return $adapterClass, $realType returned"; |
|
28 | |||
29 | 1 | $this->channel = $channel; |
|
30 | 1 | parent::__construct($message, $code, $previous); |
|
31 | } |
||
32 | |||
33 | 1 | public function getName(): string |
|
34 | { |
||
35 | 1 | return 'Incorrect queue channel configuration'; |
|
36 | } |
||
37 | |||
38 | 1 | public function getSolution(): ?string |
|
45 | 1 | SOLUTION; |
|
46 | } |
||
47 | } |
||
48 |