original_string: public function convertObjectParentData(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
          $parent = new ObjectParentData();
  
          $object = $this->convertObject($data[JSONConstants::JSON_OBJECTPARENTS_OBJECT] ?? null);
          if ($object !== null) {
              $parent->setObject($object);
          }
  
          $parent->setRelativePathSegment((string) ($data[JSONConstants::JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT] ?? ''));
          $parent->setExtensions($this->convertExtension($data, JSONConstants::getObjectParentsKeys()));
  
          return $parent;
      }
code: public function convertObjectParentData(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
          $parent = new ObjectParentData();
  
          $object = $this->convertObject($data[JSONConstants::JSON_OBJECTPARENTS_OBJECT] ?? null);
          if ($object !== null) {
              $parent->setObject($object);
          }
  
          $parent->setRelativePathSegment((string) ($data[JSONConstants::JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT] ?? ''));
          $parent->setExtensions($this->convertExtension($data, JSONConstants::getObjectParentsKeys()));
  
          return $parent;
      }
code_tokens: public function convertObjectParentData ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ parent = new ObjectParentData ( ) ; $ object = $ this -> convertObject ( $ data [ JSONConstants :: JSON_OBJECTPARENTS_OBJECT ] ?? null ) ; if ( $ object !== null ) { $ parent -> setObject ( $ object ) ; } $ parent -> setRelativePathSegment ( ( string ) ( $ data [ JSONConstants :: JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT ] ?? '' ) ) ; $ parent -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getObjectParentsKeys ( ) ) ) ; return $ parent ; }
docstring: Convert given input data to a ObjectParentData object
  
  @param array|null $data
  @return null|ObjectParentData
docstring_tokens: Convert given input data to a ObjectParentData object