You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forbid using and and or operators in favor of && and ||.
The reason is that and and or have non obvious different precedence, which also makes this rule risky thus we might need to discuss if we instead need to create a psalm rule for it.
See also https://www.php.net/manual/en/language.operators.precedence.php
Activity
nickvergessen commentedon Sep 28, 2025
👍
provokateurin commentedon Sep 28, 2025
👍
Just need to be careful to review all changes since the risky change could have unintended consequences.
susnux commentedon Sep 28, 2025
Example for server: nextcloud/server#55363
ChristophWurst commentedon Sep 28, 2025
👍