@@ -18,33 +18,33 @@ |
||
| 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 < 2; |
| 35 | - }, 4 ); |
|
| 35 | + }, 4); |
|
| 36 | 36 | |
| 37 | 37 | return $this; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | */ |
| 42 | - protected function rewindStackWhile(callable $scope_checker, $stack_max_depth=20) |
|
| 42 | + protected function rewindStackWhile(callable $scope_checker, $stack_max_depth = 20) |
|
| 43 | 43 | { |
| 44 | - $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
|
| 44 | + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
|
| 45 | 45 | $i = 1; |
| 46 | 46 | $caller = $backtrace[$i]; |
| 47 | - while ( $scope_checker( $backtrace, $i ) ) { |
|
| 47 | + while ($scope_checker($backtrace, $i)) { |
|
| 48 | 48 | $i++; |
| 49 | 49 | $caller = $backtrace[$i]; |
| 50 | 50 | // TODO remove the previous levels of the stack? |