Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
3 / 3 |
ConfigGeneratorException | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
1 | <?php |
2 | |
3 | namespace Qmp\Laravel\FileGenerator\Services\FileGenerator\Exceptions; |
4 | |
5 | use Illuminate\Support\Str; |
6 | use Exception; |
7 | use Throwable; |
8 | |
9 | class ConfigGeneratorException extends Exception |
10 | { |
11 | /** |
12 | * @param string $type |
13 | * @param $errors |
14 | * @param int $code |
15 | * @param \Throwable|null $previous |
16 | */ |
17 | public function __construct(string $type, $errors, $code = 0, Throwable $previous = null) |
18 | { |
19 | $message = Str::upper($type) . ' config validation failed: ' . implode(', ', $errors->all()); |
20 | parent::__construct($message, $code, $previous); |
21 | } |
22 | } |