Verified Commit cc97afe4 authored by Dave Long's avatar Dave Long
Browse files

Issue #3359048 by Spokje, smustgrave: Fix PHPStan L1 errors "Cannot unset...

Issue #3359048 by Spokje, smustgrave: Fix PHPStan L1 errors "Cannot unset offset 'foo' on array<int, string>."
parent 95c061fa
Loading
Loading
Loading
Loading
+1 −0
Changes for core/modules/taxonomy/src/TermStorage.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -449,6 +449,7 @@ public function getVocabularyHierarchyType($vid) {
   * {@inheritdoc}
   */
  public function __sleep() {
    /** @var string[] $vars */
    $vars = parent::__sleep();
    // Do not serialize static cache.
    unset($vars['ancestors'], $vars['treeChildren'], $vars['treeParents'], $vars['treeTerms'], $vars['trees'], $vars['vocabularyHierarchyType']);
+0 −30
Changes for core/phpstan-baseline.neon: 0 added lines, 30 removed lines.
Original line number Diff line number Diff line
@@ -2030,36 +2030,6 @@ parameters:
			count: 1
			path: modules/taxonomy/src/TermForm.php

		-
			message: "#^Cannot unset offset 'ancestors' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Cannot unset offset 'treeChildren' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Cannot unset offset 'treeParents' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Cannot unset offset 'treeTerms' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Cannot unset offset 'trees' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Cannot unset offset 'vocabularyHierarchy…' on array\\<int, string\\>\\.$#"
			count: 1
			path: modules/taxonomy/src/TermStorage.php

		-
			message: "#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
			count: 1