Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
klausi committed Jan 28, 2024
1 parent decf1a0 commit c7c32d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/src/Kernel/DataProducer/EntityDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
12 changes: 12 additions & 0 deletions tests/src/Kernel/DataProducer/EntityReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
}

Expand Down

0 comments on commit c7c32d4

Please sign in to comment.