Skip to content

Cleanup ClassExistsFunctionTypeSpecifyingExtension#5748

Merged
staabm merged 3 commits into
phpstan:2.1.xfrom
staabm:cl
May 24, 2026
Merged

Cleanup ClassExistsFunctionTypeSpecifyingExtension#5748
staabm merged 3 commits into
phpstan:2.1.xfrom
staabm:cl

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented May 24, 2026

similar to #5739

cleaning up all *_exists variants. and is_a() which is similar to instanceof

if (count($constantStrings) === 1) {
$specifiedTypes = new SpecifiedTypes();

foreach ($constantStrings as $constantString) {
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.

no need to loop, since we know size=1

@staabm staabm requested a review from VincentLanglet May 24, 2026 11:42
@staabm staabm merged commit c88b2c6 into phpstan:2.1.x May 24, 2026
656 of 661 checks passed
@staabm staabm deleted the cl branch May 24, 2026 12:02
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.

2 participants