original_string: public function getImports()
      {
          $imports = [];
          $tokens = token_get_all(file_get_contents($this->file));
          reset($tokens);
          $token = '';
          while ($token !== false) {
              $token = next($tokens);
              if (!is_array($token)) {
                  continue;
              }
              if ($token[0] === T_USE) {
                  $stmt = $this->parseUseStatement($tokens);
                  $imports += $stmt;
              } elseif ($token[0] === T_CLASS) {
                  break;
              }
          }
          return $imports;
      }
code: public function getImports()
      {
          $imports = [];
          $tokens = token_get_all(file_get_contents($this->file));
          reset($tokens);
          $token = '';
          while ($token !== false) {
              $token = next($tokens);
              if (!is_array($token)) {
                  continue;
              }
              if ($token[0] === T_USE) {
                  $stmt = $this->parseUseStatement($tokens);
                  $imports += $stmt;
              } elseif ($token[0] === T_CLASS) {
                  break;
              }
          }
          return $imports;
      }
code_tokens: public function getImports ( ) { $ imports = [ ] ; $ tokens = token_get_all ( file_get_contents ( $ this -> file ) ) ; reset ( $ tokens ) ; $ token = '' ; while ( $ token !== false ) { $ token = next ( $ tokens ) ; if ( ! is_array ( $ token ) ) { continue ; } if ( $ token [ 0 ] === T_USE ) { $ stmt = $ this -> parseUseStatement ( $ tokens ) ; $ imports += $ stmt ; } elseif ( $ token [ 0 ] === T_CLASS ) { break ; } } return $ imports ; }
docstring: Gets all imported classes
  
  @return array
docstring_tokens: Gets all imported classes