original_string: protected function peridotScanChildren(Scope $scope, callable $fn, &$accumulator = [])
      {
          if (! empty($accumulator)) {
              return $accumulator;
          }
  
          $children = $scope->peridotGetChildScopes();
          foreach ($children as $childScope) {
              $fn($childScope, $accumulator);
              $this->peridotScanChildren($childScope, $fn, $accumulator);
          }
  
          if (empty($accumulator)) {
              return [null, false];
          }
  
          return $accumulator;
      }
code: protected function peridotScanChildren(Scope $scope, callable $fn, &$accumulator = [])
      {
          if (! empty($accumulator)) {
              return $accumulator;
          }
  
          $children = $scope->peridotGetChildScopes();
          foreach ($children as $childScope) {
              $fn($childScope, $accumulator);
              $this->peridotScanChildren($childScope, $fn, $accumulator);
          }
  
          if (empty($accumulator)) {
              return [null, false];
          }
  
          return $accumulator;
      }
code_tokens: protected function peridotScanChildren ( Scope $ scope , callable $ fn , & $ accumulator = [ ] ) { if ( ! empty ( $ accumulator ) ) { return $ accumulator ; } $ children = $ scope -> peridotGetChildScopes ( ) ; foreach ( $ children as $ childScope ) { $ fn ( $ childScope , $ accumulator ) ; $ this -> peridotScanChildren ( $ childScope , $ fn , $ accumulator ) ; } if ( empty ( $ accumulator ) ) { return [ null , false ] ; } return $ accumulator ; }
docstring: Scan child scopes and execute a function against each one passing an
  accumulator reference along.
  
  @param Scope $scope
  @param callable $fn
  @param array $accumulator
  @return array
docstring_tokens: Scan child scopes and execute a function against each one passing an accumulator reference along .