@@ -18,31 +18,31 @@ |
||
| 18 | 18 | { |
| 19 | 19 | parent::__construct(...func_get_args()); |
| 20 | 20 | |
| 21 | - $this->rewindStackWhile( function($backtrace, $level) { |
|
| 21 | + $this->rewindStackWhile(function($backtrace, $level) { |
|
| 22 | 22 | // Finds the closest caller |
| 23 | - return isset($backtrace[ $level ]['class']) |
|
| 24 | - && $backtrace[ $level ]['class'] == __CLASS__; |
|
| 25 | - }, 0 ); |
|
| 23 | + return isset($backtrace[$level]['class']) |
|
| 24 | + && $backtrace[$level]['class'] == __CLASS__; |
|
| 25 | + }, 0); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | */ |
| 30 | 30 | public function setStackLocationHere() |
| 31 | 31 | { |
| 32 | - $this->rewindStackWhile( function($backtrace, $level) { |
|
| 32 | + $this->rewindStackWhile(function($backtrace, $level) { |
|
| 33 | 33 | // Finds the closest caller |
| 34 | 34 | return $level == 0; |
| 35 | - }, 2 ); |
|
| 35 | + }, 2); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | */ |
| 40 | - protected function rewindStackWhile(callable $scope_checker, $stack_max_depth=20) |
|
| 40 | + protected function rewindStackWhile(callable $scope_checker, $stack_max_depth = 20) |
|
| 41 | 41 | { |
| 42 | - $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
|
| 42 | + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
|
| 43 | 43 | $i = 1; |
| 44 | 44 | $caller = $backtrace[$i]; |
| 45 | - while ( $scope_checker( $backtrace, $i ) ) { |
|
| 45 | + while ($scope_checker($backtrace, $i)) { |
|
| 46 | 46 | $i++; |
| 47 | 47 | $caller = $backtrace[$i]; |
| 48 | 48 | // TODO remove the prevuce levels of the stack? |