original_string: protected function handleImportLoop($name)
      {
          for ($env = $this->env; $env; $env = $env->parent) {
              $file = $this->sourceNames[$env->block->sourceIndex];
  
              if (realpath($file) === $name) {
                  $this->throwError('An @import loop has been found: %s imports %s', $file, basename($file));
                  break;
              }
          }
      }
code: protected function handleImportLoop($name)
      {
          for ($env = $this->env; $env; $env = $env->parent) {
              $file = $this->sourceNames[$env->block->sourceIndex];
  
              if (realpath($file) === $name) {
                  $this->throwError('An @import loop has been found: %s imports %s', $file, basename($file));
                  break;
              }
          }
      }
code_tokens: protected function handleImportLoop ( $ name ) { for ( $ env = $ this -> env ; $ env ; $ env = $ env -> parent ) { $ file = $ this -> sourceNames [ $ env -> block -> sourceIndex ] ; if ( realpath ( $ file ) === $ name ) { $ this -> throwError ( 'An @import loop has been found: %s imports %s' , $ file , basename ( $ file ) ) ; break ; } } }
docstring: Handle import loop
  
  @param string $name
  
  @throws \Exception
docstring_tokens: Handle import loop