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;
    }
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;
    }
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 ; }
Gets all imported classes

@return array
Gets all imported classes