Skip to content

Commit

Permalink
Fix alwaysTrue errors
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 13, 2024
1 parent f1902bc commit 3ed109e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ parameters:

ignoreErrors:
- identifier: missingType.generics
- identifier: instanceof.alwaysTrue

# skip as always string
- '#Parameter \#1 \$currentWorkingDirectory of class PHPStan\\DependencyInjection\\ContainerFactory constructor expects string, string\|false given#'
2 changes: 1 addition & 1 deletion src/NodeAnalyzer/ComplexityAffectingNodeFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function isBreakingNode(Node $node): bool
if ($this->isInstanceOf($node, self::BREAKING_NODE_TYPES)) {
// skip empty breaks
/** @var Goto_|Break_|Continue_ $node */
if ($node instanceof Goto_ && $node->name instanceof Identifier) {
if ($node instanceof Goto_) {
return true;
}

Expand Down

0 comments on commit 3ed109e

Please sign in to comment.