original_string: protected function getQueryNameAndAliasForType($typeDefinitionMixed, $autoAlias)
      {
          $alias = null;
          if (is_array($typeDefinitionMixed)) {
              list ($typeDefinitionMixed, $alias) = $typeDefinitionMixed;
          }
          if ($typeDefinitionMixed instanceof TypeDefinitionInterface) {
              $queryName = $typeDefinitionMixed->getQueryName();
          } elseif (is_string($typeDefinitionMixed) && strpos($typeDefinitionMixed, ' ')) {
              list ($typeDefinitionMixed, $alias) = explode(' ', $typeDefinitionMixed, 2);
          }
          try {
              $queryName = $this->session->getTypeDefinition($typeDefinitionMixed)->getQueryName();
          } catch (CmisObjectNotFoundException $error) {
              $queryName = $typeDefinitionMixed;
          }
          return [$queryName, ($alias ? $alias : $autoAlias)];
      }
code: protected function getQueryNameAndAliasForType($typeDefinitionMixed, $autoAlias)
      {
          $alias = null;
          if (is_array($typeDefinitionMixed)) {
              list ($typeDefinitionMixed, $alias) = $typeDefinitionMixed;
          }
          if ($typeDefinitionMixed instanceof TypeDefinitionInterface) {
              $queryName = $typeDefinitionMixed->getQueryName();
          } elseif (is_string($typeDefinitionMixed) && strpos($typeDefinitionMixed, ' ')) {
              list ($typeDefinitionMixed, $alias) = explode(' ', $typeDefinitionMixed, 2);
          }
          try {
              $queryName = $this->session->getTypeDefinition($typeDefinitionMixed)->getQueryName();
          } catch (CmisObjectNotFoundException $error) {
              $queryName = $typeDefinitionMixed;
          }
          return [$queryName, ($alias ? $alias : $autoAlias)];
      }
code_tokens: protected function getQueryNameAndAliasForType ( $ typeDefinitionMixed , $ autoAlias ) { $ alias = null ; if ( is_array ( $ typeDefinitionMixed ) ) { list ( $ typeDefinitionMixed , $ alias ) = $ typeDefinitionMixed ; } if ( $ typeDefinitionMixed instanceof TypeDefinitionInterface ) { $ queryName = $ typeDefinitionMixed -> getQueryName ( ) ; } elseif ( is_string ( $ typeDefinitionMixed ) && strpos ( $ typeDefinitionMixed , ' ' ) ) { list ( $ typeDefinitionMixed , $ alias ) = explode ( ' ' , $ typeDefinitionMixed , 2 ) ; } try { $ queryName = $ this -> session -> getTypeDefinition ( $ typeDefinitionMixed ) -> getQueryName ( ) ; } catch ( CmisObjectNotFoundException $ error ) { $ queryName = $ typeDefinitionMixed ; } return [ $ queryName , ( $ alias ? $ alias : $ autoAlias ) ] ; }
docstring: Translates a TypeDefinition or string into a query name for
  that TypeDefinition. Returns the input string as fallback if
  the type could not be resolved. Input may contain an alias,
  if so, we split and preserve the alias but attempt to translate
  the type ID part.
  
  @param mixed $typeDefinitionMixed Input describing the type
  @param string $autoAlias If alias is not provided
  @return array
docstring_tokens: Translates a TypeDefinition or string into a query name for that TypeDefinition . Returns the input string as fallback if the type could not be resolved . Input may contain an alias if so we split and preserve the alias but attempt to translate the type ID part .