Total Complexity | 2 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 77.78% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class UnknownDeviceException extends PushwooshException |
||
9 | { |
||
10 | protected $devices; |
||
11 | |||
12 | /** |
||
13 | * Create a new unknown device exception. |
||
14 | * |
||
15 | * @param mixed $devices |
||
16 | * @param int $code |
||
17 | * @param \Throwable|null $previous |
||
18 | * @return void |
||
19 | */ |
||
20 | 6 | public function __construct($devices, $code = 0, Throwable $previous = null) |
|
21 | { |
||
22 | 6 | $this->devices = (array)$devices; |
|
23 | |||
24 | 6 | parent::__construct( |
|
25 | 6 | sprintf('Unknown device(s) referenced: %s', implode(', ', Arr::flatten($this->devices))), |
|
26 | 6 | $code, |
|
27 | 6 | $previous |
|
28 | ); |
||
29 | 6 | } |
|
30 | |||
31 | /** |
||
32 | * Get the unknown devices per message. |
||
33 | * |
||
34 | * @return string[][] |
||
35 | */ |
||
36 | public function getDevices() |
||
39 | } |
||
40 | } |
||
41 |