tests/src/Traits/EntityReferenceTestTrait.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/src/Traits/EntityReferenceTestTrait.php b/tests/src/Traits/EntityReferenceTestTrait.php index 449039a..6a3e0b1 100644 --- a/tests/src/Traits/EntityReferenceTestTrait.php +++ b/tests/src/Traits/EntityReferenceTestTrait.php @@ -6,21 +6,23 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; /** + * Provides common functionality for the EntityReference test classes. + * * @see \Drupal\Tests\field\Traits\EntityReferenceTestTrait * @todo Remove when JSON API requires Drupal >=8.6 */ trait EntityReferenceTestTrait { /** - * Creates a field of an entity reference field storage on the specified bundle. + * Creates an entity reference field storage on the specified bundle. * * @param string $entity_type * The type of entity the field will be attached to. * @param string $bundle * The bundle name of the entity the field will be attached to. * @param string $field_name - * The name of the field; if it already exists, a new instance of the existing - * field will be created. + * The name of the field; if it already exists, a new instance of the + * existing field will be created. * @param string $field_label * The label of the field. * @param string $target_entity_type @@ -35,7 +37,7 @@ trait EntityReferenceTestTrait { * * @see \Drupal\Core\Entity\Plugin\EntityReferenceSelection\SelectionBase::buildConfigurationForm() */ - protected function createEntityReferenceField($entity_type, $bundle, $field_name, $field_label, $target_entity_type, $selection_handler = 'default', $selection_handler_settings = [], $cardinality = 1) { + protected function createEntityReferenceField($entity_type, $bundle, $field_name, $field_label, $target_entity_type, $selection_handler = 'default', array $selection_handler_settings = [], $cardinality = 1) { // Look for or add the specified field to the requested entity bundle. if (!FieldStorageConfig::loadByName($entity_type, $field_name)) { FieldStorageConfig::create([