| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare( strict_types=1 ); |
||
| 55 | public function __toString() { |
||
| 56 | if ( $this->isOK() ) { |
||
| 57 | $stat = 'OK'; |
||
| 58 | $errs = "\tNo errors."; |
||
| 59 | } else { |
||
| 60 | $stat = 'ERROR'; |
||
| 61 | $formattedErrs = []; |
||
| 62 | foreach ( $this->errors as $err ) { |
||
| 63 | $formattedErrs[] = "\t - $err"; |
||
| 64 | } |
||
| 65 | $errs = implode( "\n", $formattedErrs ); |
||
| 66 | } |
||
| 67 | return "=== RESULT ===\n - Status: $stat\n - Errors:\n$errs\n"; |
||
| 68 | } |
||
| 79 |