Skip to content

Fix throw on failure with require/force array#5349

Merged
VincentLanglet merged 2 commits intophpstan:2.1.xfrom
VincentLanglet:throwOnFailure
Mar 30, 2026
Merged

Fix throw on failure with require/force array#5349
VincentLanglet merged 2 commits intophpstan:2.1.xfrom
VincentLanglet:throwOnFailure

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

Some findings when working on #5315

}
}

$throwOnFailure = $this->hasFlag('FILTER_THROW_ON_FAILURE', $flagsType)->yes();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this condition is used a few lines above another time.
I think this can also use if ($throwOnFailure) {

@VincentLanglet VincentLanglet merged commit 8b36ae3 into phpstan:2.1.x Mar 30, 2026
651 of 655 checks passed
phpstan-bot pushed a commit to phpstan-bot/phpstan-src that referenced this pull request Apr 7, 2026
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