Skip to content

Fix PHPStorm inspection errors#4700

Merged
ondrejmirtes merged 5 commits intophpstan:2.1.xfrom
staabm:testfix
Jan 3, 2026
Merged

Fix PHPStorm inspection errors#4700
ondrejmirtes merged 5 commits intophpstan:2.1.xfrom
staabm:testfix

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Jan 3, 2026

No description provided.

continue;
}

foreach ($catchTypes as $catchTypeIndex => $catchTypeItem) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused variable $catchTypeIndex

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slevomat CS typically catches this, can you figure out why it doesn't in this case, maybe create a failign test for slevomat/coding-standard?

'blocks',
];

foreach ($keys as $key) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused variable $key

$this->acceptUppercaseString($string);
$this->acceptUppercaseString($uppercaseString);
$this->acceptUppercaseString($numericString);
$this->acceptUppercaseString($nonEmptyLowercaseString);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined variable

@staabm staabm marked this pull request as ready for review January 3, 2026 10:15
@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

continue;
}

foreach ($catchTypes as $catchTypeIndex => $catchTypeItem) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slevomat CS typically catches this, can you figure out why it doesn't in this case, maybe create a failign test for slevomat/coding-standard?

@ondrejmirtes ondrejmirtes merged commit d3d6752 into phpstan:2.1.x Jan 3, 2026
635 of 644 checks passed
@staabm staabm deleted the testfix branch January 3, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants