original_string: public function updateType($repositoryId, TypeDefinitionInterface $type, ExtensionDataInterface $extension = null)
      {
          $url = $this->getRepositoryUrl($repositoryId);
  
          $url->getQuery()->modify(
              [
                  Constants::CONTROL_CMISACTION => Constants::CMISACTION_UPDATE_TYPE,
                  Constants::CONTROL_TYPE => json_encode($this->getJsonConverter()->convertFromTypeDefinition($type))
              ]
          );
  
          return $this->getJsonConverter()->convertTypeDefinition($this->postJson($url));
      }
code: public function updateType($repositoryId, TypeDefinitionInterface $type, ExtensionDataInterface $extension = null)
      {
          $url = $this->getRepositoryUrl($repositoryId);
  
          $url->getQuery()->modify(
              [
                  Constants::CONTROL_CMISACTION => Constants::CMISACTION_UPDATE_TYPE,
                  Constants::CONTROL_TYPE => json_encode($this->getJsonConverter()->convertFromTypeDefinition($type))
              ]
          );
  
          return $this->getJsonConverter()->convertTypeDefinition($this->postJson($url));
      }
code_tokens: public function updateType ( $ repositoryId , TypeDefinitionInterface $ type , ExtensionDataInterface $ extension = null ) { $ url = $ this -> getRepositoryUrl ( $ repositoryId ) ; $ url -> getQuery ( ) -> modify ( [ Constants :: CONTROL_CMISACTION => Constants :: CMISACTION_UPDATE_TYPE , Constants :: CONTROL_TYPE => json_encode ( $ this -> getJsonConverter ( ) -> convertFromTypeDefinition ( $ type ) ) ] ) ; return $ this -> getJsonConverter ( ) -> convertTypeDefinition ( $ this -> postJson ( $ url ) ) ; }
docstring: Updates a type.
  
  @param string $repositoryId the identifier for the repository
  @param TypeDefinitionInterface $type the type definition
  @param ExtensionDataInterface|null $extension
  @return TypeDefinitionInterface the updated type
docstring_tokens: Updates a type .