@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | if (is_object($p2) && !($p2 instanceof Exception)) { |
130 | 130 | if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { |
131 | 131 | throw new PEAR_Exception( |
132 | - 'exception cause must be Exception, ' . |
|
132 | + 'exception cause must be Exception, '. |
|
133 | 133 | 'array, or PEAR_Error' |
134 | 134 | ); |
135 | 135 | } |
@@ -304,11 +304,9 @@ discard block |
||
304 | 304 | 'class' => $cause['package'], |
305 | 305 | 'message' => $cause['message'], |
306 | 306 | 'file' => isset($cause['context']['file']) ? |
307 | - $cause['context']['file'] : |
|
308 | - 'unknown', |
|
307 | + $cause['context']['file'] : 'unknown', |
|
309 | 308 | 'line' => isset($cause['context']['line']) ? |
310 | - $cause['context']['line'] : |
|
311 | - 'unknown', |
|
309 | + $cause['context']['line'] : 'unknown', |
|
312 | 310 | ); |
313 | 311 | } |
314 | 312 | } |
@@ -326,7 +324,7 @@ discard block |
||
326 | 324 | $this->_trace = $this->getTrace(); |
327 | 325 | if (empty($this->_trace)) { |
328 | 326 | $backtrace = debug_backtrace(); |
329 | - $this->_trace = array($backtrace[count($backtrace)-1]); |
|
327 | + $this->_trace = array($backtrace[count($backtrace) - 1]); |
|
330 | 328 | } |
331 | 329 | } |
332 | 330 | return $this->_trace; |
@@ -380,25 +378,25 @@ discard block |
||
380 | 378 | $trace = $this->getTraceSafe(); |
381 | 379 | $causes = array(); |
382 | 380 | $this->getCauseMessage($causes); |
383 | - $html = '<table style="border: 1px" cellspacing="0">' . "\n"; |
|
381 | + $html = '<table style="border: 1px" cellspacing="0">'."\n"; |
|
384 | 382 | foreach ($causes as $i => $cause) { |
385 | 383 | $html .= '<tr><td colspan="3" style="background: #ff9999">' |
386 | - . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: ' |
|
384 | + . str_repeat('-', $i).' <b>'.$cause['class'].'</b>: ' |
|
387 | 385 | . htmlspecialchars($cause['message']) |
388 | - . ' in <b>' . $cause['file'] . '</b> ' |
|
389 | - . 'on line <b>' . $cause['line'] . '</b>' |
|
386 | + . ' in <b>'.$cause['file'].'</b> ' |
|
387 | + . 'on line <b>'.$cause['line'].'</b>' |
|
390 | 388 | . "</td></tr>\n"; |
391 | 389 | } |
392 | - $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n" |
|
390 | + $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>'."\n" |
|
393 | 391 | . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>' |
394 | 392 | . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>' |
395 | - . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n"; |
|
393 | + . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>'."\n"; |
|
396 | 394 | |
397 | 395 | foreach ($trace as $k => $v) { |
398 | - $html .= '<tr><td style="text-align: center;">' . $k . '</td>' |
|
396 | + $html .= '<tr><td style="text-align: center;">'.$k.'</td>' |
|
399 | 397 | . '<td>'; |
400 | 398 | if (!empty($v['class'])) { |
401 | - $html .= $v['class'] . $v['type']; |
|
399 | + $html .= $v['class'].$v['type']; |
|
402 | 400 | } |
403 | 401 | $html .= $v['function']; |
404 | 402 | $args = array(); |
@@ -415,24 +413,24 @@ discard block |
||
415 | 413 | } else if (is_int($arg) || is_double($arg)) { |
416 | 414 | $args[] = $arg; |
417 | 415 | } else { |
418 | - $arg = (string)$arg; |
|
416 | + $arg = (string) $arg; |
|
419 | 417 | $str = htmlspecialchars(substr($arg, 0, 16)); |
420 | 418 | if (strlen($arg) > 16) { |
421 | 419 | $str .= '…'; |
422 | 420 | } |
423 | - $args[] = "'" . $str . "'"; |
|
421 | + $args[] = "'".$str."'"; |
|
424 | 422 | } |
425 | 423 | } |
426 | 424 | } |
427 | - $html .= '(' . implode(', ', $args) . ')' |
|
425 | + $html .= '('.implode(', ', $args).')' |
|
428 | 426 | . '</td>' |
429 | - . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown') |
|
430 | - . ':' . (isset($v['line']) ? $v['line'] : 'unknown') |
|
431 | - . '</td></tr>' . "\n"; |
|
427 | + . '<td>'.(isset($v['file']) ? $v['file'] : 'unknown') |
|
428 | + . ':'.(isset($v['line']) ? $v['line'] : 'unknown') |
|
429 | + . '</td></tr>'."\n"; |
|
432 | 430 | } |
433 | - $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>' |
|
431 | + $html .= '<tr><td style="text-align: center;">'.($k + 1).'</td>' |
|
434 | 432 | . '<td>{main}</td>' |
435 | - . '<td> </td></tr>' . "\n" |
|
433 | + . '<td> </td></tr>'."\n" |
|
436 | 434 | . '</table>'; |
437 | 435 | return $html; |
438 | 436 | } |
@@ -448,10 +446,10 @@ discard block |
||
448 | 446 | $this->getCauseMessage($causes); |
449 | 447 | $causeMsg = ''; |
450 | 448 | foreach ($causes as $i => $cause) { |
451 | - $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' |
|
452 | - . $cause['message'] . ' in ' . $cause['file'] |
|
453 | - . ' on line ' . $cause['line'] . "\n"; |
|
449 | + $causeMsg .= str_repeat(' ', $i).$cause['class'].': ' |
|
450 | + . $cause['message'].' in '.$cause['file'] |
|
451 | + . ' on line '.$cause['line']."\n"; |
|
454 | 452 | } |
455 | - return $causeMsg . $this->getTraceAsString(); |
|
453 | + return $causeMsg.$this->getTraceAsString(); |
|
456 | 454 | } |
457 | 455 | } |