@@ -364,21 +364,21 @@ public static function create(ContainerInterface $container, array $configuratio
364364 /**
365365 * {@inheritdoc}
366366 */
367- public function getMetadataFormat () : array {
367+ public function getMetadataFormat () {
368368 return static ::METADATA_FORMAT ;
369369 }
370370
371371 /**
372372 * {@inheritdoc}
373373 */
374- public function getMetadataWrapper () : array {
374+ public function getMetadataWrapper () {
375375 return static ::METADATA_WRAPPER ;
376376 }
377377
378378 /**
379379 * {@inheritdoc}
380380 */
381- public function transformRecord (ContentEntityInterface $ entity ) : string {
381+ public function transformRecord (ContentEntityInterface $ entity ) {
382382 $ render_array = [];
383383 $ this ->addFields ($ entity );
384384 $ render_array ['elements ' ] = $ this ->elements ;
@@ -466,7 +466,7 @@ protected function addMedia(MediaInterface $media, string $element) : void {
466466 * @param \Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList $values
467467 * The paragraphs themselves.
468468 */
469- protected function addParagraph (string $ paragraph_name , EntityReferenceRevisionsFieldItemList $ values ) : void {
469+ protected function addParagraph ($ paragraph_name , EntityReferenceRevisionsFieldItemList $ values ) {
470470 foreach ($ values as $ value ) {
471471 foreach ($ value ->entity ->getFields () as $ field_name => $ field_values ) {
472472 $ mapped_field = $ this ->getParagraphField ($ paragraph_name , $ field_name );
@@ -483,7 +483,7 @@ protected function addParagraph(string $paragraph_name, EntityReferenceRevisions
483483 * @param \Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList $values
484484 * The list of title paragraphs.
485485 */
486- protected function handleTitleParagraphs (EntityReferenceRevisionsFieldItemList $ values ) : void {
486+ protected function handleTitleParagraphs (EntityReferenceRevisionsFieldItemList $ values ) {
487487 foreach ($ values as $ value ) {
488488 if ($ value ->entity ->access ('view ' )) {
489489 $ title = $ value ->entity ->get ('field_title ' );
@@ -505,7 +505,7 @@ protected function handleTitleParagraphs(EntityReferenceRevisionsFieldItemList $
505505 * @param \Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList $values
506506 * The list of title paragraphs.
507507 */
508- protected function handleNoteParagraphs (EntityReferenceRevisionsFieldItemList $ values ) : void {
508+ protected function handleNoteParagraphs (EntityReferenceRevisionsFieldItemList $ values ) {
509509 foreach ($ values as $ value ) {
510510 if ($ value ->entity ->access ('view ' )) {
511511 $ note = $ value ->entity ->get ('field_note ' );
@@ -532,7 +532,7 @@ protected function handleNoteParagraphs(EntityReferenceRevisionsFieldItemList $v
532532 * @param string $metadata_field
533533 * The field to add to the elements array using these values.
534534 */
535- protected function addValues (FieldItemListInterface $ items , $ metadata_field ) : void {
535+ protected function addValues (FieldItemListInterface $ items , $ metadata_field ) {
536536 foreach ($ items as $ item ) {
537537 $ index = $ item ->mainPropertyName ();
538538 if ($ index === 'alias ' ) {
@@ -554,7 +554,7 @@ protected function addValues(FieldItemListInterface $items, $metadata_field) : v
554554 * @param \Drupal\Core\Field\EntityReferenceFieldItemListInterface $items
555555 * The item list to get values from.
556556 */
557- protected function addLinkedAgentValues (EntityReferenceFieldItemListInterface $ items ) : void {
557+ protected function addLinkedAgentValues (EntityReferenceFieldItemListInterface $ items ) {
558558 foreach ($ items as $ item ) {
559559 $ metadata_field = $ this ->getLinkedAgentMetadataField ($ item ->getValue ()['rel_type ' ]);
560560 if ($ metadata_field && $ item ->entity ) {
@@ -573,7 +573,7 @@ protected function addLinkedAgentValues(EntityReferenceFieldItemListInterface $i
573573 * @param bool $alias
574574 * If the url should be an alias.
575575 */
576- protected function addPersistentUrl (ContentEntityInterface $ entity , $ dest , $ alias ) : void {
576+ protected function addPersistentUrl (ContentEntityInterface $ entity , $ dest , $ alias ) {
577577 $ optons = [
578578 'absolute ' => TRUE ,
579579 'alias ' => $ alias ,
@@ -589,7 +589,7 @@ protected function addPersistentUrl(ContentEntityInterface $entity, $dest, $alia
589589 * @param string $dest
590590 * The destination index for the thumbnail.
591591 */
592- public function addThumbnail (ContentEntityInterface $ entity , string $ dest ) : void {
592+ public function addThumbnail (ContentEntityInterface $ entity , $ dest ) {
593593 $ event = $ this ->imageDiscovery ->getImage ($ entity );
594594
595595 if ($ event ->hasMedia ()) {
@@ -606,7 +606,7 @@ public function addThumbnail(ContentEntityInterface $entity, string $dest) : voi
606606 * @return false|string
607607 * The field name if it exists in the mapping, FALSE otherwise.
608608 */
609- protected function getMetadataField ($ field_name ) : false | string {
609+ protected function getMetadataField ($ field_name ) {
610610 return $ this ->fieldMapping [$ field_name ] ?? FALSE ;
611611 }
612612
@@ -622,7 +622,7 @@ protected function getMetadataField($field_name) : false|string {
622622 * The field mapping for that field within the paragraph if one exists, or
623623 * FALSE otherwise.
624624 */
625- protected function getParagraphField (string $ paragraph_name , string $ field_name ) : false | string {
625+ protected function getParagraphField ($ paragraph_name , $ field_name ) {
626626 return $ this ->paragraphMapping [$ paragraph_name ][$ field_name ] ?? FALSE ;
627627 }
628628
@@ -635,7 +635,7 @@ protected function getParagraphField(string $paragraph_name, string $field_name)
635635 * @return false|string
636636 * The mapped field, or FALSE if the linked agent type is unhandled.
637637 */
638- protected function getLinkedAgentMetadataField (string $ rel_type ) : false | string {
638+ protected function getLinkedAgentMetadataField ($ rel_type ) {
639639 return $ this ->linkedAgentMap [$ rel_type ] ?? FALSE ;
640640 }
641641
@@ -648,7 +648,7 @@ protected function getLinkedAgentMetadataField(string $rel_type) : false|string
648648 * @return bool
649649 * Whether the given $paragraph_name has mapped metadata fields.
650650 */
651- protected function isParagraphField (string $ paragraph_name ) : bool {
651+ protected function isParagraphField ($ paragraph_name ) {
652652 return isset ($ this ->paragraphMapping [$ paragraph_name ]);
653653 }
654654
0 commit comments