Code Duplication    Length = 5-5 lines in 4 locations

src/POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionParser.php 4 locations

@@ 672-676 (lines=5) @@
669
        // be converted to language specific function call by expression
670
        // provider
671
        $string = new StringType();
672
        if ($left->typeIs($string) && $right->typeIs($string)) {
673
            $strcmpFunctions = FunctionDescription::stringComparisonFunctions();
674
            $left = new FunctionCallExpression($strcmpFunctions[0], [$left, $right]);
675
            $right = new ConstantExpression(0, new Int32());
676
        }
677
678
        $dateTime = new DateTime();
679
        if ($left->typeIs($dateTime) && $right->typeIs($dateTime)) {
@@ 679-683 (lines=5) @@
676
        }
677
678
        $dateTime = new DateTime();
679
        if ($left->typeIs($dateTime) && $right->typeIs($dateTime)) {
680
            $dateTimeCmpFunctions = FunctionDescription::dateTimeComparisonFunctions();
681
            $left = new FunctionCallExpression($dateTimeCmpFunctions[0], [$left, $right]);
682
            $right = new ConstantExpression(0, new Int32());
683
        }
684
685
        $guid = new Guid();
686
        if ($left->typeIs($guid) && $right->typeIs($guid)) {
@@ 686-690 (lines=5) @@
683
        }
684
685
        $guid = new Guid();
686
        if ($left->typeIs($guid) && $right->typeIs($guid)) {
687
            $guidEqualityFunctions = FunctionDescription::guidEqualityFunctions();
688
            $left = new FunctionCallExpression($guidEqualityFunctions[0], [$left, $right]);
689
            $right = new ConstantExpression(true, new Boolean());
690
        }
691
692
        $binary = new Binary();
693
        if ($left->typeIs($binary) && $right->typeIs($binary)) {
@@ 693-697 (lines=5) @@
690
        }
691
692
        $binary = new Binary();
693
        if ($left->typeIs($binary) && $right->typeIs($binary)) {
694
            $binaryEqualityFunctions = FunctionDescription::binaryEqualityFunctions();
695
            $left = new FunctionCallExpression($binaryEqualityFunctions[0], [$left, $right]);
696
            $right = new ConstantExpression(true, new Boolean());
697
        }
698
699
        $null = new Null1();
700
        if ($left->typeIs($null) || $right->typeIs($null)) {