Skip to content

ci(psalm): Add a checker against logical operators - #56284

Merged
nickvergessen merged 1 commit into
masterfrom
ci/noid/prevent-logical-boolean-operators
Nov 7, 2025
Merged

ci(psalm): Add a checker against logical operators#56284
nickvergessen merged 1 commit into
masterfrom
ci/noid/prevent-logical-boolean-operators

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

Test run with manipulated code in Talk
Bildschirmfoto vom 2025-11-07 12-04-26

Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
public static function afterExpressionAnalysis(AfterExpressionAnalysisEvent $event): ?bool {
$stmt = $event->getExpr();
if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\LogicalAnd
|| $stmt instanceof PhpParser\Node\Expr\BinaryOp\LogicalOr) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
||$stmtinstanceofPhpParser\Node\Expr\BinaryOp\LogicalOr) {
or$stmtinstanceofPhpParser\Node\Expr\BinaryOp\LogicalOr) {

/s

@nickvergessen
nickvergessen merged commit 968a934 into masterNov 7, 2025
210 of 221 checks passed
@nickvergessen
nickvergessen deleted the ci/noid/prevent-logical-boolean-operators branch November 7, 2025 22:47
@nextcloud-botnextcloud-bot mentioned this pull request Jan 6, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewstechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nickvergessen@ChristophWurst@provokateurin