@@ 498-513 (lines=16) @@ | ||
495 | * |
|
496 | * @return IType |
|
497 | */ |
|
498 | public static function verifyAndPromoteArithmeticOpArguments($expressionToken, |
|
499 | $leftArgument, $rightArgument |
|
500 | ) { |
|
501 | $function |
|
502 | = self::findFunctionWithPromotion( |
|
503 | self::arithmeticOperationFunctions(), |
|
504 | array($leftArgument, $rightArgument) |
|
505 | ); |
|
506 | if ($function == null) { |
|
507 | self::incompatibleError( |
|
508 | $expressionToken, array($leftArgument, $rightArgument) |
|
509 | ); |
|
510 | } |
|
511 | ||
512 | return $function->returnType; |
|
513 | } |
|
514 | ||
515 | /** |
|
516 | * Validate operands of an logical operation |
|
@@ 526-539 (lines=14) @@ | ||
523 | * |
|
524 | * @throws ODataException |
|
525 | */ |
|
526 | public static function verifyLogicalOpArguments($expressionToken, |
|
527 | $leftArgument, $rightArgument |
|
528 | ) { |
|
529 | $function = self::findFunctionWithPromotion( |
|
530 | self::logicalOperationFunctions(), |
|
531 | array($leftArgument, $rightArgument), false |
|
532 | ); |
|
533 | if ($function == null) { |
|
534 | self::incompatibleError( |
|
535 | $expressionToken, |
|
536 | array($leftArgument, $rightArgument) |
|
537 | ); |
|
538 | } |
|
539 | } |
|
540 | ||
541 | /** |
|
542 | * Validate operands of an relational operation |