Skip to content

Commit

Permalink
Fix codesniffs.
Browse files Browse the repository at this point in the history
  • Loading branch information
idimopoulos authored and claudiu-cristea committed Jul 9, 2024
1 parent 7efc5bc commit 0534b25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ public function expand($values) {
$target_bundle_key = $entity_definition->getKey('bundle');
}


// The values can either be a direct label reference or a complex array
// containing multiple properties of the field. For example, the file field
// contains a target_id, a description and a display property. If the
// target_id exists as a property, we assume that the other properties are
// also present. Retrieve all labels and load the entities.
$main_property = $this->fieldInfo->getMainPropertyName();
$labels = array_map(function ($value) use ($main_property){
$labels = array_map(function ($value) use ($main_property) {
return is_array($value) && isset($value[$main_property]) ? $value[$main_property] : $value;
}, $values);

Expand Down

0 comments on commit 0534b25

Please sign in to comment.