@@ -84,23 +84,23 @@ |
||
| 84 | 84 | protected function getBacktrace() |
| 85 | 85 | { |
| 86 | 86 | $backtrace = debug_backtrace(); |
| 87 | - $backtrace = $backtrace[ 1 ]; |
|
| 87 | + $backtrace = $backtrace[1]; |
|
| 88 | 88 | |
| 89 | - if (isset($backtrace[ 'class' ]) AND isset($backtrace[ 'type' ])) { |
|
| 90 | - $chronology[ 'call' ] = $backtrace[ 'class' ] . $backtrace[ 'type' ] . $backtrace[ 'function' ] . '()'; |
|
| 91 | - $chronology[ 'type' ] = $backtrace[ 'type' ] === '->' ? 'non-static' : 'static'; |
|
| 89 | + if (isset($backtrace['class']) AND isset($backtrace['type'])) { |
|
| 90 | + $chronology['call'] = $backtrace['class'] . $backtrace['type'] . $backtrace['function'] . '()'; |
|
| 91 | + $chronology['type'] = $backtrace['type'] === '->' ? 'non-static' : 'static'; |
|
| 92 | 92 | } else { |
| 93 | - $chronology[ 'call' ] = $backtrace[ 'function' ] . '()'; |
|
| 94 | - $chronology[ 'type' ] = 'non-static'; |
|
| 93 | + $chronology['call'] = $backtrace['function'] . '()'; |
|
| 94 | + $chronology['type'] = 'non-static'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - if (isset($backtrace[ 'file' ])) { |
|
| 98 | - $chronology[ 'file' ] = (isset($backtrace[ 'file' ]) ? $backtrace[ 'file' ] : ''); |
|
| 99 | - $chronology[ 'line' ] = (isset($backtrace[ 'line' ]) ? $backtrace[ 'line' ] : ''); |
|
| 97 | + if (isset($backtrace['file'])) { |
|
| 98 | + $chronology['file'] = (isset($backtrace['file']) ? $backtrace['file'] : ''); |
|
| 99 | + $chronology['line'] = (isset($backtrace['line']) ? $backtrace['line'] : ''); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | if (defined('PATH_ROOT')) { |
| 103 | - $chronology[ 'file' ] = str_replace(PATH_ROOT, '', $chronology[ 'file' ]); |
|
| 103 | + $chronology['file'] = str_replace(PATH_ROOT, '', $chronology['file']); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return new Trace\Datastructures\Chronology($chronology); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * @param $className |
| 20 | 20 | */ |
| 21 | 21 | spl_autoload_register( |
| 22 | - function ($className) { |
|
| 22 | + function($className) { |
|
| 23 | 23 | if (strpos($className, 'O2System\Gear\\') === false) { |
| 24 | 24 | return; |
| 25 | 25 | } |