diff --git a/php-checks/src/main/java/org/sonar/php/checks/BooleanEqualityComparisonCheck.java b/php-checks/src/main/java/org/sonar/php/checks/BooleanEqualityComparisonCheck.java index 66ffe2da9..13bce6217 100644 --- a/php-checks/src/main/java/org/sonar/php/checks/BooleanEqualityComparisonCheck.java +++ b/php-checks/src/main/java/org/sonar/php/checks/BooleanEqualityComparisonCheck.java @@ -36,7 +36,8 @@ public class BooleanEqualityComparisonCheck extends PHPVisitorCheck { Kind.ALTERNATIVE_CONDITIONAL_AND, Kind.EQUAL_TO, Kind.NOT_EQUAL_TO, - Kind.ALTERNATIVE_NOT_EQUAL_TO + Kind.ALTERNATIVE_NOT_EQUAL_TO, + Kind.ALTERNATIVE_CONDITIONAL_XOR }; @Override diff --git a/php-checks/src/test/resources/checks/BooleanEqualityComparisonCheck.php b/php-checks/src/test/resources/checks/BooleanEqualityComparisonCheck.php index c6eef2aee..2179147b4 100644 --- a/php-checks/src/test/resources/checks/BooleanEqualityComparisonCheck.php +++ b/php-checks/src/test/resources/checks/BooleanEqualityComparisonCheck.php @@ -18,6 +18,8 @@ || b || true; // Noncompliant (a || true) ? b : c; // Noncompliant +true xor a; // Noncompliant +$a xor false; // Noncompliant a === false; // OK - exception a === true; // OK - exception