original_string: public function import(array $classes)
      {
          foreach ($classes as $class => $alias) {
              if (is_integer($class)) {
                  $class = $alias;
                  $alias = ClassHelper::getSimpleName($class);
              }
              if (isset($this->imports[$alias])) {
                  throw new \RuntimeException("Alias $alias for $class exists, previous is "
                                              . $this->imports[$alias]);
              }
              $this->imports[$alias] = $class;
          }
          return $this;
      }
code: public function import(array $classes)
      {
          foreach ($classes as $class => $alias) {
              if (is_integer($class)) {
                  $class = $alias;
                  $alias = ClassHelper::getSimpleName($class);
              }
              if (isset($this->imports[$alias])) {
                  throw new \RuntimeException("Alias $alias for $class exists, previous is "
                                              . $this->imports[$alias]);
              }
              $this->imports[$alias] = $class;
          }
          return $this;
      }
code_tokens: public function import ( array $ classes ) { foreach ( $ classes as $ class => $ alias ) { if ( is_integer ( $ class ) ) { $ class = $ alias ; $ alias = ClassHelper :: getSimpleName ( $ class ) ; } if ( isset ( $ this -> imports [ $ alias ] ) ) { throw new \ RuntimeException ( "Alias $alias for $class exists, previous is " . $ this -> imports [ $ alias ] ) ; } $ this -> imports [ $ alias ] = $ class ; } return $ this ; }
docstring: Imports annotation classes
docstring_tokens: Imports annotation classes