diff --git a/core/modules/system/tests/modules/entity_test_update/entity_test_update.module b/core/modules/system/tests/modules/entity_test_update/entity_test_update.module index f2447db..8c34017 100644 --- a/core/modules/system/tests/modules/entity_test_update/entity_test_update.module +++ b/core/modules/system/tests/modules/entity_test_update/entity_test_update.module @@ -9,16 +9,17 @@ use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\entity_test_update\Entity\EntityTestUpdate; +use Drupal\Core\Entity\EntityTypeInterface; /** * Implements hook_entity_base_field_info(). */ -function entity_test_update_entity_base_field_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { +function entity_test_update_entity_base_field_info(EntityTypeInterface $entity_type) { // Add a base field that will be used to test that fields added through // hook_entity_base_field_info() are handled correctly during a schema // conversion (e.g. from non-revisionable to revisionable). if ($entity_type->id() == 'entity_test_update') { - $fields = array(); + $fields = array[]; $fields['test_entity_base_field_info'] = BaseFieldDefinition::create('string') ->setLabel(new TranslatableMarkup('Field added by hook_entity_base_field_info()')) ->setTranslatable(TRUE) diff --git a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php index 0de2460..bcd7774 100644 --- a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php +++ b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php @@ -91,15 +91,15 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setTranslatable(TRUE) ->setRevisionable(TRUE) ->setSetting('max_length', 32) - ->setDisplayOptions('view', array( + ->setDisplayOptions('view',[ 'label' => 'hidden', 'type' => 'string', 'weight' => -5, - )) - ->setDisplayOptions('form', array( + ]) + ->setDisplayOptions('form', [ 'type' => 'string_textfield', 'weight' => -5, - )); + ]); $fields['test_single_property'] = BaseFieldDefinition::create('string') ->setLabel(new TranslatableMarkup('Field with a single property')) @@ -144,7 +144,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setRevisionable(FALSE) ->setTranslatable(FALSE); - $fields += \Drupal::state()->get('entity_test_update.additional_base_field_definitions', array()); + $fields += \Drupal::state()->get('entity_test_update.additional_base_field_definitions', []); return $fields; } @@ -153,7 +153,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { */ public static function bundleFieldDefinitions(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { $fields = parent::bundleFieldDefinitions($entity_type, $bundle, $base_field_definitions); - $fields += \Drupal::state()->get('entity_test_update.additional_bundle_field_definitions.' . $bundle, array()); + $fields += \Drupal::state()->get('entity_test_update.additional_bundle_field_definitions.' . $bundle, []); return $fields; }