From 2b9fbf72dc7f32d70164a54050b1ba7163669390 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 23 Feb 2026 14:30:24 +0100 Subject: [PATCH 1/2] Revert "Fix || vs && operator precedence (#63)" This reverts commit 4133cfbe196758088e6fbb38e7413fcbdd86425b. --- src/FormulaConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormulaConverter.php b/src/FormulaConverter.php index 3587a8d..05a6d19 100644 --- a/src/FormulaConverter.php +++ b/src/FormulaConverter.php @@ -134,7 +134,7 @@ private static function expandAtom($atom) $chunk = "({$what} == {$from} || {$what} == {$to})"; break; case '!=': - $chunk = "({$what} != {$from}) && ({$what} == {$to})"; + $chunk = "{$what} != {$from} && {$what} == {$to}"; break; } } else { From 7ecd4f2079d33b09b3673a8bf134aa360c2ec470 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 23 Feb 2026 14:32:22 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Actually=20fix=20expanding=20"=E2=80=A6=20!?= =?UTF-8?q?=3D=20.."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/FormulaConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormulaConverter.php b/src/FormulaConverter.php index 05a6d19..45fbc53 100644 --- a/src/FormulaConverter.php +++ b/src/FormulaConverter.php @@ -134,7 +134,7 @@ private static function expandAtom($atom) $chunk = "({$what} == {$from} || {$what} == {$to})"; break; case '!=': - $chunk = "{$what} != {$from} && {$what} == {$to}"; + $chunk = "{$what} != {$from} && {$what} != {$to}"; break; } } else {