From c7c32d4e4e9d6d145bd39f5f53426872268eee4c Mon Sep 17 00:00:00 2001 From: Klaus Purer Date: Sun, 28 Jan 2024 13:27:28 +0100 Subject: [PATCH] fix phpcs --- .../src/Kernel/DataProducer/EntityDefinitionTest.php | 1 - .../src/Kernel/DataProducer/EntityReferenceTest.php | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/src/Kernel/DataProducer/EntityDefinitionTest.php b/tests/src/Kernel/DataProducer/EntityDefinitionTest.php index 48021598d..18fba53f1 100644 --- a/tests/src/Kernel/DataProducer/EntityDefinitionTest.php +++ b/tests/src/Kernel/DataProducer/EntityDefinitionTest.php @@ -7,7 +7,6 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\graphql\GraphQL\ResolverBuilder; -use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\graphql\Kernel\GraphQLTestBase; diff --git a/tests/src/Kernel/DataProducer/EntityReferenceTest.php b/tests/src/Kernel/DataProducer/EntityReferenceTest.php index 0a8de5d75..b64d2d897 100644 --- a/tests/src/Kernel/DataProducer/EntityReferenceTest.php +++ b/tests/src/Kernel/DataProducer/EntityReferenceTest.php @@ -9,14 +9,26 @@ // @todo Drupal 9 compatibility: use the deprecated trait for Drupal 9. if (strpos(\Drupal::VERSION, '9') === 0) { + + /** + * Helper trait for compatibility with Drupal 9. + * + * @phpcs:disable Drupal.Classes.ClassFileName.NoMatch + */ trait EntityReferenceFieldCreationTrait { // @phpstan-ignore-next-line use \Drupal\Tests\field\Traits\EntityReferenceTestTrait; + } } else { + + /** + * Helper trait for compatibility with Drupal 10. + */ trait EntityReferenceFieldCreationTrait { use \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait; + } }