original_string: public function resolve($name, $declaringClass)
      {
          if (strpos($name, '\\') !== false) {
              return $name;
          }
          $imports = $this->cache->get('_PHX.imports.'.$declaringClass);
          if (!isset($imports)) {
              $imports = ClassHelper::getImports($declaringClass);
              $this->cache->save('_PHX.imports.'.$declaringClass, $imports);
          }
          if (isset($imports[$name])) {
              return $imports[$name];
          }
          $class = ClassHelper::getNamespaceName($declaringClass) . $name;
          if (class_exists($class)) {
              return $class;
          }
      }
code: public function resolve($name, $declaringClass)
      {
          if (strpos($name, '\\') !== false) {
              return $name;
          }
          $imports = $this->cache->get('_PHX.imports.'.$declaringClass);
          if (!isset($imports)) {
              $imports = ClassHelper::getImports($declaringClass);
              $this->cache->save('_PHX.imports.'.$declaringClass, $imports);
          }
          if (isset($imports[$name])) {
              return $imports[$name];
          }
          $class = ClassHelper::getNamespaceName($declaringClass) . $name;
          if (class_exists($class)) {
              return $class;
          }
      }
code_tokens: public function resolve ( $ name , $ declaringClass ) { if ( strpos ( $ name , '\\' ) !== false ) { return $ name ; } $ imports = $ this -> cache -> get ( '_PHX.imports.' . $ declaringClass ) ; if ( ! isset ( $ imports ) ) { $ imports = ClassHelper :: getImports ( $ declaringClass ) ; $ this -> cache -> save ( '_PHX.imports.' . $ declaringClass , $ imports ) ; } if ( isset ( $ imports [ $ name ] ) ) { return $ imports [ $ name ] ; } $ class = ClassHelper :: getNamespaceName ( $ declaringClass ) . $ name ; if ( class_exists ( $ class ) ) { return $ class ; } }
docstring: Gets full class name
  
  @param string $name
  @param string $declaringClass
  @return string|null
docstring_tokens: Gets full class name