original_string: public function convertTypeDefinition(TypeDefinitionInterface $typeDefinition)
      {
          if ($typeDefinition instanceof DocumentTypeDefinitionInterface) {
              return new DocumentType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof FolderTypeDefinitionInterface) {
              return new FolderType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof RelationshipTypeDefinitionInterface) {
              return new RelationshipType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof PolicyTypeDefinitionInterface) {
              return new PolicyType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof ItemTypeDefinitionInterface) {
              return new ItemType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof SecondaryTypeDefinitionInterface) {
              return new SecondaryType($this->session, $typeDefinition);
          } else {
              throw new CmisRuntimeException(
                  sprintf('Unknown base type! Received "%s"', get_class($typeDefinition)),
                  1422028427
              );
          }
      }
code: public function convertTypeDefinition(TypeDefinitionInterface $typeDefinition)
      {
          if ($typeDefinition instanceof DocumentTypeDefinitionInterface) {
              return new DocumentType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof FolderTypeDefinitionInterface) {
              return new FolderType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof RelationshipTypeDefinitionInterface) {
              return new RelationshipType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof PolicyTypeDefinitionInterface) {
              return new PolicyType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof ItemTypeDefinitionInterface) {
              return new ItemType($this->session, $typeDefinition);
          } elseif ($typeDefinition instanceof SecondaryTypeDefinitionInterface) {
              return new SecondaryType($this->session, $typeDefinition);
          } else {
              throw new CmisRuntimeException(
                  sprintf('Unknown base type! Received "%s"', get_class($typeDefinition)),
                  1422028427
              );
          }
      }
code_tokens: public function convertTypeDefinition ( TypeDefinitionInterface $ typeDefinition ) { if ( $ typeDefinition instanceof DocumentTypeDefinitionInterface ) { return new DocumentType ( $ this -> session , $ typeDefinition ) ; } elseif ( $ typeDefinition instanceof FolderTypeDefinitionInterface ) { return new FolderType ( $ this -> session , $ typeDefinition ) ; } elseif ( $ typeDefinition instanceof RelationshipTypeDefinitionInterface ) { return new RelationshipType ( $ this -> session , $ typeDefinition ) ; } elseif ( $ typeDefinition instanceof PolicyTypeDefinitionInterface ) { return new PolicyType ( $ this -> session , $ typeDefinition ) ; } elseif ( $ typeDefinition instanceof ItemTypeDefinitionInterface ) { return new ItemType ( $ this -> session , $ typeDefinition ) ; } elseif ( $ typeDefinition instanceof SecondaryTypeDefinitionInterface ) { return new SecondaryType ( $ this -> session , $ typeDefinition ) ; } else { throw new CmisRuntimeException ( sprintf ( 'Unknown base type! Received "%s"' , get_class ( $ typeDefinition ) ) , 1422028427 ) ; } }
docstring: Convert a type definition to a type
  
  @param TypeDefinitionInterface $typeDefinition
  @return ObjectTypeInterface
  @throws CmisRuntimeException
docstring_tokens: Convert a type definition to a type