Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
ZipExporterFileErrorList | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getUserMessage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace oat\taoMediaManager\model; |
4 | |
5 | use common_exception_UserReadableException as UserReadableException; |
6 | use LogicException; |
7 | |
8 | class ZipExporterFileErrorList extends LogicException implements UserReadableException |
9 | { |
10 | private array $errors; |
11 | |
12 | public function __construct(array $errors) |
13 | { |
14 | $this->errors = $errors; |
15 | $this->message = $this->getUserMessage(); |
16 | } |
17 | |
18 | public function getUserMessage(): string |
19 | { |
20 | return sprintf('Errors in zip file: <br>%s', implode('<br>', $this->errors)); |
21 | } |
22 | } |