Conditions | 3 |
Paths | 4 |
Total Lines | 23 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | protected function getGetterMapping(ReflectionClass $reflectionClass): array |
||
38 | { |
||
39 | $mapping = parent::getGetterMapping($reflectionClass); |
||
40 | $mapping['message'] = [new MessageGetter()]; |
||
41 | $mapping['code'] = [new CodeGetter()]; |
||
42 | unset($mapping['file']); |
||
43 | unset($mapping['line']); |
||
44 | unset($mapping['previous']); |
||
45 | if ($this->debug) { |
||
46 | $mapping['trace'] = $mapping['traceAsString']; |
||
47 | } else { |
||
48 | unset($mapping['trace']); |
||
49 | } |
||
50 | unset($mapping['traceAsString']); |
||
51 | if ($reflectionClass->name === ValidationException::class) { |
||
52 | $mapping['errors'] = [new ErrorsGetter()]; |
||
53 | unset($mapping['exceptions']); |
||
54 | unset($mapping['i18n']); |
||
55 | unset($mapping['errorBag']); |
||
56 | unset($mapping['headers']); |
||
57 | unset($mapping['statusCode']); |
||
58 | } |
||
59 | return $mapping; |
||
60 | } |
||
62 |