From 0534b25123155d90d2eb09a88347b8ac2cad99da Mon Sep 17 00:00:00 2001 From: Ilias Dimopoulos Date: Thu, 13 Oct 2022 15:24:06 +0300 Subject: [PATCH] Fix codesniffs. --- src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php b/src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php index 4518dbf..ef33ede 100644 --- a/src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php +++ b/src/Drupal/Driver/Fields/Drupal8/EntityReferenceHandler.php @@ -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);