Skip to content

chore: fix assign.propertyType error from PHPStan#9332

Merged
gharlan merged 3 commits intoPHP-CS-Fixer:masterfrom
gharlan:fix-assign-propertyType
Jan 11, 2026
Merged

chore: fix assign.propertyType error from PHPStan#9332
gharlan merged 3 commits intoPHP-CS-Fixer:masterfrom
gharlan:fix-assign-propertyType

Conversation

@gharlan
Copy link
Copy Markdown
Member

@gharlan gharlan commented Jan 4, 2026

No description provided.

Comment thread src/FixerConfiguration/FixerOption.php Outdated

if (null !== $allowedValues) {
foreach ($allowedValues as &$allowedValue) {
$allowedValues = array_map(function ($allowedValue) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

PHPStan doesn't like loops with reference variables.
But IMO array_map is also more readable for humans.

@coveralls
Copy link
Copy Markdown

coveralls commented Jan 4, 2026

Coverage Status

coverage: 93.061%. remained the same
when pulling 5c8401b on gharlan:fix-assign-propertyType
into 4687c9e on PHP-CS-Fixer:master.

Comment thread src/FixerConfiguration/FixerOption.php Outdated
Copy link
Copy Markdown
Member

@keradus keradus left a comment

Choose a reason for hiding this comment

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

good one

@gharlan gharlan enabled auto-merge (squash) January 11, 2026 11:38
@gharlan gharlan merged commit 3ef9ce3 into PHP-CS-Fixer:master Jan 11, 2026
33 checks passed
@gharlan gharlan deleted the fix-assign-propertyType branch January 11, 2026 11:39
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