Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use the proper operator#283

Merged
greg0ire merged 1 commit into
2.0.xfrom
ampersand
Jul 30, 2025
Merged

Use the proper operator#283
greg0ire merged 1 commit into
2.0.xfrom
ampersand

Conversation

@greg0ire
Copy link
Copy Markdown
Member

@greg0ire greg0ire commented Jul 29, 2025

Spotted while converting the codebase to PHP 8.4. Static analysis is OK with this when it is in a phpdoc comment, but not as a property.

Using a pipe to mean "and" is a legacy of a time where & was not understood by tooling.

Using a pipe to mean "and" is a legacy of a time where & was not
understood by tooling.
@greg0ire
Copy link
Copy Markdown
Member Author

I noticed that doing this allows us to bump the PHPStan level to 10 without any other modification. But just because we can does not mean we should. Let me know what you think. In any case, it could be done in a subsequent PR.

Copy link
Copy Markdown
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

I don't mind if level 10 will be introduced in this or another PR.

@greg0ire greg0ire merged commit 804bc64 into 2.0.x Jul 30, 2025
11 checks passed
@greg0ire greg0ire deleted the ampersand branch July 30, 2025 07:44
@greg0ire greg0ire added this to the 2.0.11 milestone Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants