Skip to content

Commit

Permalink
fix phpstan bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 9, 2024
1 parent adfccff commit 1d5e223
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
}
}

if ([] !== $this->symbolsForImport) {
if ([] !== $this->symbolsForImport) { // @phpstan-ignore-line self::$symbolsForImport property is updated by self::symbolsForImport() impure method
if (null !== $lastUseAnalysis) {
$atIndex = $lastUseAnalysis->getEndIndex() + 1;
} elseif (0 !== $namespace->getEndIndex()) {
Expand All @@ -299,7 +299,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
}

// Insert all registered FQCNs
$this->createImportProcessor()->insertImports($tokens, $this->symbolsForImport, $atIndex);
$this->createImportProcessor()->insertImports($tokens, $this->symbolsForImport, $atIndex); // @phpstan-ignore-line self::$symbolsForImport property is updated by self::symbolsForImport() impure method

$this->symbolsForImport = [];
}
Expand Down Expand Up @@ -454,8 +454,6 @@ private function shortenSymbol(string $fqcn, array $uses, string $namespaceName)

/**
* @param array<string, string> $uses
*
* @phpstan-impure
*/
private function setupUsesFromDiscoveredSymbols(array &$uses, string $namespaceName): void
{
Expand Down

0 comments on commit 1d5e223

Please sign in to comment.