original_string: public function getTypeFromObjectData(ObjectDataInterface $objectData)
      {
          if ($objectData->getProperties() === null || count($objectData->getProperties()->getProperties()) === 0) {
              return null;
          }
  
          $typeProperty = $objectData->getProperties()->getProperties()[PropertyIds::OBJECT_TYPE_ID];
  
          if (!$typeProperty instanceof PropertyId) {
              return null;
          }
  
          return $this->session->getTypeDefinition($typeProperty->getFirstValue());
      }
code: public function getTypeFromObjectData(ObjectDataInterface $objectData)
      {
          if ($objectData->getProperties() === null || count($objectData->getProperties()->getProperties()) === 0) {
              return null;
          }
  
          $typeProperty = $objectData->getProperties()->getProperties()[PropertyIds::OBJECT_TYPE_ID];
  
          if (!$typeProperty instanceof PropertyId) {
              return null;
          }
  
          return $this->session->getTypeDefinition($typeProperty->getFirstValue());
      }
code_tokens: public function getTypeFromObjectData ( ObjectDataInterface $ objectData ) { if ( $ objectData -> getProperties ( ) === null || count ( $ objectData -> getProperties ( ) -> getProperties ( ) ) === 0 ) { return null ; } $ typeProperty = $ objectData -> getProperties ( ) -> getProperties ( ) [ PropertyIds :: OBJECT_TYPE_ID ] ; if ( ! $ typeProperty instanceof PropertyId ) { return null ; } return $ this -> session -> getTypeDefinition ( $ typeProperty -> getFirstValue ( ) ) ; }
docstring: Try to determined what object type the given objectData belongs to and return that type.
  
  @param ObjectDataInterface $objectData
  @return ObjectTypeInterface|null The object type or <code>null</code> if type could not be determined
docstring_tokens: Try to determined what object type the given objectData belongs to and return that type .