Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function handleException(CodeWarning $exception): bool |
||
44 | { |
||
45 | $isError = $exception instanceof CodeError; |
||
46 | $isFixable = $exception->isFixable(); |
||
47 | $method = 'add'; |
||
48 | |||
49 | if ($isFixable) { |
||
50 | $method .= 'Fixable'; |
||
51 | } |
||
52 | |||
53 | $method .= $isError ? 'Error' : 'Warning'; |
||
54 | |||
55 | return $this->file->$method( |
||
56 | $exception->getMessage(), |
||
57 | $exception->getStackPosition(), |
||
58 | $exception->getCode(), |
||
59 | $exception->getPayload() |
||
60 | ); |
||
61 | } |
||
62 | } |
||
63 |