| Conditions | 5 |
| Paths | 9 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __construct($msg = '', $code = 0, $file = NULL, $line = NULL) |
||
| 25 | { |
||
| 26 | |||
| 27 | $msgs = []; |
||
| 28 | foreach (libxml_get_errors() as $err) { |
||
| 29 | $format = $err->level === LIBXML_ERR_WARNING ? self::WARN_MSG_FORMAT : self::ERR_MSG_FORMAT; |
||
| 30 | $msgs[] = sprintf($format, $err->file, $err->line, $err->column, $err->message, $err->code); |
||
| 31 | } |
||
| 32 | $msg .= implode("\n", $msgs); |
||
| 33 | |||
| 34 | if (isset($file)) { |
||
| 35 | $msg .= ' (' . $file; |
||
| 36 | if (isset($line)) { |
||
| 37 | $msg .= ': ' . $line; |
||
| 38 | } |
||
| 39 | $msg .= ')'; |
||
| 40 | } |
||
| 41 | |||
| 42 | parent::__construct($msg, $code); |
||
| 43 | } |
||
| 52 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.