@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | while ($this->_token->Id == ExpressionTokenId::DOT) { |
| 352 | 352 | $this->nextToken(); |
| 353 | 353 | $this->validateToken(ExpressionTokenId::IDENTIFIER); |
| 354 | - $identifier = $identifier . '.' . $this->_token->Text; |
|
| 354 | + $identifier = $identifier.'.'.$this->_token->Text; |
|
| 355 | 355 | $this->nextToken(); |
| 356 | 356 | } |
| 357 | 357 | |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | || strcasecmp('X', $tokenText) == 0 |
| 459 | 459 | || strcasecmp('x', $tokenText) == 0 |
| 460 | 460 | ) { |
| 461 | - $id = ExpressionTokenId::BINARY_LITERAL; |
|
| 461 | + $id = ExpressionTokenId::BINARY_LITERAL; |
|
| 462 | 462 | } else { |
| 463 | 463 | return; |
| 464 | 464 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $this->_lexer->nextToken(); |
| 203 | 203 | $right = $this->_parseComparison(); |
| 204 | 204 | FunctionDescription::verifyLogicalOpArguments($logicalOpToken, $left, $right); |
| 205 | - $left = new LogicalExpression($left, $right, ExpressionType::AND_LOGICAL ); |
|
| 205 | + $left = new LogicalExpression($left, $right, ExpressionType::AND_LOGICAL); |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | $this->_recurseLeave(); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | if ($additiveToken->identifierIs(ODataConstants::KEYWORD_ADD)) { |
| 251 | 251 | $left = new ArithmeticExpression($left, $right, ExpressionType::ADD, $opReturnType); |
| 252 | 252 | } else { |
| 253 | - $left = new ArithmeticExpression($left, $right, ExpressionType::SUBTRACT, $opReturnType ); |
|
| 253 | + $left = new ArithmeticExpression($left, $right, ExpressionType::SUBTRACT, $opReturnType); |
|
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | && (ExpressionLexer::isNumeric($this->_getCurrentToken()->Id)) |
| 309 | 309 | ) { |
| 310 | 310 | $numberLiteral = $this->_getCurrentToken(); |
| 311 | - $numberLiteral->Text = '-' . $numberLiteral->Text; |
|
| 311 | + $numberLiteral->Text = '-'.$numberLiteral->Text; |
|
| 312 | 312 | $numberLiteral->Position = $op->Position; |
| 313 | 313 | $v = $this->_getCurrentToken(); |
| 314 | 314 | $this->_setCurrentToken($numberLiteral); |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | $dateTime = new DateTime(); |
| 671 | 671 | if ($left->typeIs($dateTime) && $right->typeIs($dateTime)) { |
| 672 | 672 | $dateTimeCmpFunctions = FunctionDescription::dateTimeComparisonFunctions(); |
| 673 | - $left = new FunctionCallExpression( $dateTimeCmpFunctions[0], array($left, $right)); |
|
| 673 | + $left = new FunctionCallExpression($dateTimeCmpFunctions[0], array($left, $right)); |
|
| 674 | 674 | $right = new ConstantExpression(0, new Int32()); |
| 675 | 675 | } |
| 676 | 676 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | $expressionProcessor = new ExpressionProcessor($expressionProvider); |
| 94 | 94 | |
| 95 | 95 | try { |
| 96 | - $expressionAsString = $expressionProcessor->processExpression( $expressionTree ); |
|
| 96 | + $expressionAsString = $expressionProcessor->processExpression($expressionTree); |
|
| 97 | 97 | } catch (\InvalidArgumentException $invalidArgumentException) { |
| 98 | - throw ODataException::createInternalServerError( $invalidArgumentException->getMessage() ); |
|
| 98 | + throw ODataException::createInternalServerError($invalidArgumentException->getMessage()); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | $parent = $nullCheckExpTree; |
| 519 | 519 | $key = null; |
| 520 | 520 | do { |
| 521 | - $key = $parent->getResourceProperty()->getName() . '_' . $key; |
|
| 521 | + $key = $parent->getResourceProperty()->getName().'_'.$key; |
|
| 522 | 522 | $parent = $parent->getParent(); |
| 523 | 523 | } while ($parent != null); |
| 524 | 524 | |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | { |
| 86 | 86 | if ($this->Id != ExpressionTokenId::IDENTIFIER) { |
| 87 | 87 | throw ODataException::createSyntaxError( |
| 88 | - 'Identifier expected at position ' . $this->Position |
|
| 88 | + 'Identifier expected at position '.$this->Position |
|
| 89 | 89 | ); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -15,92 +15,92 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Arithmetic expression with 'add' operator |
| 17 | 17 | */ |
| 18 | - const ADD = 1; |
|
| 18 | + const ADD = 1; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Logical expression with 'and' operator |
| 22 | 22 | */ |
| 23 | - const AND_LOGICAL = 2; |
|
| 23 | + const AND_LOGICAL = 2; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Funcation call expression |
| 27 | 27 | * e.g. substringof('Alfreds', CompanyName) |
| 28 | 28 | */ |
| 29 | - const CALL = 3; |
|
| 29 | + const CALL = 3; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Constant expression. e.g. In the expression |
| 33 | 33 | * OrderID ne null and OrderID add 2 gt 5432 |
| 34 | 34 | * 2, null, 5432 are candicate for constant expression |
| 35 | 35 | */ |
| 36 | - const CONSTANT = 4; |
|
| 36 | + const CONSTANT = 4; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Arithmetic expression with 'div' operator |
| 40 | 40 | */ |
| 41 | - const DIVIDE = 5; |
|
| 41 | + const DIVIDE = 5; |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * Comparison expression with 'eq' operator |
| 45 | 45 | */ |
| 46 | - const EQUAL = 6; |
|
| 46 | + const EQUAL = 6; |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Comparison expression with 'gt' operator |
| 50 | 50 | */ |
| 51 | - const GREATERTHAN = 7; |
|
| 51 | + const GREATERTHAN = 7; |
|
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * Comparison expression with 'ge' operator |
| 55 | 55 | */ |
| 56 | - const GREATERTHAN_OR_EQUAL = 8; |
|
| 56 | + const GREATERTHAN_OR_EQUAL = 8; |
|
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * Comparison expression with 'lt' operator |
| 60 | 60 | */ |
| 61 | - const LESSTHAN = 9; |
|
| 61 | + const LESSTHAN = 9; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Comparison expression with 'le' operator |
| 65 | 65 | */ |
| 66 | - const LESSTHAN_OR_EQUAL = 10; |
|
| 66 | + const LESSTHAN_OR_EQUAL = 10; |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * Arithmetic expression with 'mod' operator |
| 70 | 70 | */ |
| 71 | - const MODULO = 11; |
|
| 71 | + const MODULO = 11; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * Arithmetic expression with 'mul' operator |
| 75 | 75 | */ |
| 76 | - const MULTIPLY = 12; |
|
| 76 | + const MULTIPLY = 12; |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Unary expression with '-' operator |
| 80 | 80 | */ |
| 81 | - const NEGATE = 13; |
|
| 81 | + const NEGATE = 13; |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * Unary Logical expression with 'not' operator |
| 85 | 85 | */ |
| 86 | - const NOT_LOGICAL = 14; |
|
| 86 | + const NOT_LOGICAL = 14; |
|
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * Comparison expression with 'ne' operator |
| 90 | 90 | */ |
| 91 | - const NOTEQUAL = 15; |
|
| 91 | + const NOTEQUAL = 15; |
|
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * Logical expression with 'or' operator |
| 95 | 95 | */ |
| 96 | - const OR_LOGICAL = 16; |
|
| 96 | + const OR_LOGICAL = 16; |
|
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * Property expression. e.g. In the expression |
| 100 | 100 | * OrderID add 2 gt 5432 |
| 101 | 101 | * OrderID is candicate for PropertyAccessExpression |
| 102 | 102 | */ |
| 103 | - const PROPERTYACCESS = 17; |
|
| 103 | + const PROPERTYACCESS = 17; |
|
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | 106 | * Same as property expression but for nullabilty check |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * Arithmetic expression with 'sub' operator |
| 113 | 113 | */ |
| 114 | - const SUBTRACT = 19; |
|
| 114 | + const SUBTRACT = 19; |
|
| 115 | 115 | |
| 116 | 116 | |
| 117 | 117 | } |
| 118 | 118 | \ No newline at end of file |
@@ -69,13 +69,13 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function getPrototypeAsString() |
| 71 | 71 | { |
| 72 | - $str = $this->returnType->getFullTypeName() . ' ' . $this->name . '('; |
|
| 72 | + $str = $this->returnType->getFullTypeName().' '.$this->name.'('; |
|
| 73 | 73 | |
| 74 | 74 | foreach ($this->argumentTypes as $argumentType) { |
| 75 | - $str .= $argumentType->getFullTypeName() . ', '; |
|
| 75 | + $str .= $argumentType->getFullTypeName().', '; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return rtrim($str, ', ') . ')'; |
|
| 78 | + return rtrim($str, ', ').')'; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | { |
| 470 | 470 | $string = null; |
| 471 | 471 | foreach ($argExpressions as $argExpression) { |
| 472 | - $string .= $argExpression->getType()->getFullTypeName() . ', '; |
|
| 472 | + $string .= $argExpression->getType()->getFullTypeName().', '; |
|
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | $string = rtrim($string, ', '); |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | public static function validateUnaryOpArguments($expressionToken, $argExpression) |
| 631 | 631 | { |
| 632 | 632 | //Unary not |
| 633 | - if (strcmp($expressionToken->Text, ODataConstants::KEYWORD_NOT) == 0 ) { |
|
| 633 | + if (strcmp($expressionToken->Text, ODataConstants::KEYWORD_NOT) == 0) { |
|
| 634 | 634 | $function = self::findFunctionWithPromotion( |
| 635 | 635 | self::notOperationFunctions(), |
| 636 | 636 | array($argExpression) |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | - $filterFunctions = self::filterFunctionDescriptions(); |
|
| 674 | + $filterFunctions = self::filterFunctionDescriptions(); |
|
| 675 | 675 | return $filterFunctions[$expressionToken->Text]; |
| 676 | 676 | } |
| 677 | 677 | |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | if ($function == null) { |
| 696 | 696 | $protoTypes = null; |
| 697 | 697 | foreach ($functions as $function) { |
| 698 | - $protoTypes .= $function->getPrototypeAsString() . '; '; |
|
| 698 | + $protoTypes .= $function->getPrototypeAsString().'; '; |
|
| 699 | 699 | } |
| 700 | 700 | |
| 701 | 701 | throw ODataException::createSyntaxError( |
@@ -176,7 +176,7 @@ |
||
| 176 | 176 | // Also we can think about moving above urlencode to this |
| 177 | 177 | // function |
| 178 | 178 | $value = $type->convertToOData($currentObject); |
| 179 | - $nextPageLink .= $value . ', '; |
|
| 179 | + $nextPageLink .= $value.', '; |
|
| 180 | 180 | } |
| 181 | 181 | } catch (\ReflectionException $reflectionException) { |
| 182 | 182 | throw ODataException::createInternalServerError( |
@@ -111,25 +111,25 @@ |
||
| 111 | 111 | |
| 112 | 112 | foreach ($ancestors as $i => $anscestor) { |
| 113 | 113 | if ($i == 0) { |
| 114 | - $parameterNames = array ( |
|
| 115 | - '$' . $anscestor . 'A', '$' . $anscestor . 'B' |
|
| 114 | + $parameterNames = array( |
|
| 115 | + '$'.$anscestor.'A', '$'.$anscestor.'B' |
|
| 116 | 116 | ); |
| 117 | 117 | $accessor1 = $parameterNames[0]; |
| 118 | 118 | $accessor2 = $parameterNames[1]; |
| 119 | - $flag1 = '$flag1 = ' . 'is_null(' . $accessor1. ') || '; |
|
| 120 | - $flag2 = '$flag2 = ' . 'is_null(' . $accessor2. ') || '; |
|
| 119 | + $flag1 = '$flag1 = '.'is_null('.$accessor1.') || '; |
|
| 120 | + $flag2 = '$flag2 = '.'is_null('.$accessor2.') || '; |
|
| 121 | 121 | } else { |
| 122 | - $accessor1 .= '->' . $anscestor; |
|
| 123 | - $accessor2 .= '->' . $anscestor; |
|
| 124 | - $flag1 .= 'is_null(' .$accessor1 . ')' . ' || '; |
|
| 125 | - $flag2 .= 'is_null(' .$accessor2 . ')' . ' || '; |
|
| 122 | + $accessor1 .= '->'.$anscestor; |
|
| 123 | + $accessor2 .= '->'.$anscestor; |
|
| 124 | + $flag1 .= 'is_null('.$accessor1.')'.' || '; |
|
| 125 | + $flag2 .= 'is_null('.$accessor2.')'.' || '; |
|
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - $accessor1 .= '->' . $this->propertyName; |
|
| 130 | - $accessor2 .= '->' . $this->propertyName; |
|
| 131 | - $flag1 .= 'is_null(' . $accessor1 . ')'; |
|
| 132 | - $flag2 .= 'is_null(' . $accessor2 . ')'; |
|
| 129 | + $accessor1 .= '->'.$this->propertyName; |
|
| 130 | + $accessor2 .= '->'.$this->propertyName; |
|
| 131 | + $flag1 .= 'is_null('.$accessor1.')'; |
|
| 132 | + $flag2 .= 'is_null('.$accessor2.')'; |
|
| 133 | 133 | |
| 134 | 134 | $code = "$flag1; |
| 135 | 135 | $flag2; |
@@ -444,7 +444,7 @@ |
||
| 444 | 444 | $lexer->validateToken(ExpressionTokenId::DOT); |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | - $orderByPathSegments[$i][] = '*' . $identifier; |
|
| 447 | + $orderByPathSegments[$i][] = '*'.$identifier; |
|
| 448 | 448 | $lexer->nextToken(); |
| 449 | 449 | $tokenId = $lexer->getCurrentToken()->Id; |
| 450 | 450 | if ($tokenId != ExpressionTokenId::END) { |