original_string: public function convertRendition(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
          $rendition = new RenditionData();
  
          if (isset($data[JSONConstants::JSON_RENDITION_HEIGHT])) {
              $rendition->setHeight((integer) $data[JSONConstants::JSON_RENDITION_HEIGHT]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_KIND])) {
              $rendition->setKind((string) $data[JSONConstants::JSON_RENDITION_KIND]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_LENGTH])) {
              $rendition->setLength((integer) $data[JSONConstants::JSON_RENDITION_LENGTH]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_MIMETYPE])) {
              $rendition->setMimeType((string) $data[JSONConstants::JSON_RENDITION_MIMETYPE]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_DOCUMENT_ID])) {
              $rendition->setRenditionDocumentId((string) $data[JSONConstants::JSON_RENDITION_DOCUMENT_ID]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_STREAM_ID])) {
              $rendition->setStreamId((string) $data[JSONConstants::JSON_RENDITION_STREAM_ID]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_TITLE])) {
              $rendition->setTitle((string) $data[JSONConstants::JSON_RENDITION_TITLE]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_WIDTH])) {
              $rendition->setWidth((integer) $data[JSONConstants::JSON_RENDITION_WIDTH]);
          }
  
          $rendition->setExtensions($this->convertExtension($data, JSONConstants::getRenditionKeys()));
  
          return $rendition;
      }
code: public function convertRendition(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
          $rendition = new RenditionData();
  
          if (isset($data[JSONConstants::JSON_RENDITION_HEIGHT])) {
              $rendition->setHeight((integer) $data[JSONConstants::JSON_RENDITION_HEIGHT]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_KIND])) {
              $rendition->setKind((string) $data[JSONConstants::JSON_RENDITION_KIND]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_LENGTH])) {
              $rendition->setLength((integer) $data[JSONConstants::JSON_RENDITION_LENGTH]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_MIMETYPE])) {
              $rendition->setMimeType((string) $data[JSONConstants::JSON_RENDITION_MIMETYPE]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_DOCUMENT_ID])) {
              $rendition->setRenditionDocumentId((string) $data[JSONConstants::JSON_RENDITION_DOCUMENT_ID]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_STREAM_ID])) {
              $rendition->setStreamId((string) $data[JSONConstants::JSON_RENDITION_STREAM_ID]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_TITLE])) {
              $rendition->setTitle((string) $data[JSONConstants::JSON_RENDITION_TITLE]);
          }
          if (isset($data[JSONConstants::JSON_RENDITION_WIDTH])) {
              $rendition->setWidth((integer) $data[JSONConstants::JSON_RENDITION_WIDTH]);
          }
  
          $rendition->setExtensions($this->convertExtension($data, JSONConstants::getRenditionKeys()));
  
          return $rendition;
      }
code_tokens: public function convertRendition ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ rendition = new RenditionData ( ) ; if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_HEIGHT ] ) ) { $ rendition -> setHeight ( ( integer ) $ data [ JSONConstants :: JSON_RENDITION_HEIGHT ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_KIND ] ) ) { $ rendition -> setKind ( ( string ) $ data [ JSONConstants :: JSON_RENDITION_KIND ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_LENGTH ] ) ) { $ rendition -> setLength ( ( integer ) $ data [ JSONConstants :: JSON_RENDITION_LENGTH ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_MIMETYPE ] ) ) { $ rendition -> setMimeType ( ( string ) $ data [ JSONConstants :: JSON_RENDITION_MIMETYPE ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_DOCUMENT_ID ] ) ) { $ rendition -> setRenditionDocumentId ( ( string ) $ data [ JSONConstants :: JSON_RENDITION_DOCUMENT_ID ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_STREAM_ID ] ) ) { $ rendition -> setStreamId ( ( string ) $ data [ JSONConstants :: JSON_RENDITION_STREAM_ID ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_TITLE ] ) ) { $ rendition -> setTitle ( ( string ) $ data [ JSONConstants :: JSON_RENDITION_TITLE ] ) ; } if ( isset ( $ data [ JSONConstants :: JSON_RENDITION_WIDTH ] ) ) { $ rendition -> setWidth ( ( integer ) $ data [ JSONConstants :: JSON_RENDITION_WIDTH ] ) ; } $ rendition -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getRenditionKeys ( ) ) ) ; return $ rendition ; }
docstring: Convert given input data to a RenditionData object
  
  @param array|null $data
  @return null|RenditionData
docstring_tokens: Convert given input data to a RenditionData object