Skip to content

Commit

Permalink
Merge pull request #274 from localgovdrupal/fix/2.x/273-phpstan-failures
Browse files Browse the repository at this point in the history
Fix static anaysis checks
  • Loading branch information
finnlewis authored Aug 13, 2024
2 parents e37e329 + 3f046a9 commit 69275d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ protected function childrenField(NodeInterface $node) {
*
* @param \Drupal\node\NodeInterface $node
* The `localgov_service_landing` or `localgov_service_sublanding`.
*
* @return array
* Array of node IDs.
*/
public static function referencedChildren(NodeInterface $node) {
$linked = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\node\NodeInterface;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;

Expand All @@ -16,10 +16,7 @@
class EntityReferenceServicesAutocompleteTest extends WebDriverTestBase {

use ContentTypeCreationTrait;
// FIXME: Replace with EntityReferenceFieldCreationTrait when Drupal 10.1 is
// end of life.
// @phpstan-ignore-next-line.
use EntityReferenceTestTrait;
use EntityReferenceFieldCreationTrait;
use NodeCreationTrait;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Drupal\node\NodeInterface;
use Drupal\paragraphs\Entity\Paragraph;
use Drupal\taxonomy\Entity\Term;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\pathauto\Functional\PathautoTestHelperTrait;
Expand All @@ -24,10 +24,7 @@
class ChildReferencesTest extends KernelTestBase {

use ContentTypeCreationTrait;
// FIXME: Replace with EntityReferenceFieldCreationTrait when Drupal 10.1 is
// end of life.
// @phpstan-ignore-next-line.
use EntityReferenceTestTrait;
use EntityReferenceFieldCreationTrait;
use NodeCreationTrait;
use PathautoTestHelperTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Drupal\KernelTests\KernelTestBase;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\node\NodeInterface;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\pathauto\Functional\PathautoTestHelperTrait;
Expand All @@ -18,10 +18,7 @@
class ParentFieldPathautoTest extends KernelTestBase {

use ContentTypeCreationTrait;
// FIXME: Replace with EntityReferenceFieldCreationTrait when Drupal 10.1 is
// end of life.
// @phpstan-ignore-next-line.
use EntityReferenceTestTrait;
use EntityReferenceFieldCreationTrait;
use NodeCreationTrait;
use PathautoTestHelperTrait;

Expand Down

0 comments on commit 69275d3

Please sign in to comment.