@@ -194,8 +194,7 @@ discard block |
||
| 194 | 194 | $takeCount, |
| 195 | 195 | $maxResultCount, |
| 196 | 196 | ResourceProperty $resourceProperty = null |
| 197 | - ) |
|
| 198 | - { |
|
| 197 | + ) { |
|
| 199 | 198 | $this->resourceSetWrapper = $resourceSetWrapper; |
| 200 | 199 | $this->internalOrderByInfo = $internalOrderByInfo; |
| 201 | 200 | $this->skipCount = $skipCount; |
@@ -317,8 +316,7 @@ discard block |
||
| 317 | 316 | */ |
| 318 | 317 | public function setSelectAllImmediateProperties( |
| 319 | 318 | $selectAllImmediateProperties = true |
| 320 | - ) |
|
| 321 | - { |
|
| 319 | + ) { |
|
| 322 | 320 | $this->selectAllImmediateProperties = $selectAllImmediateProperties; |
| 323 | 321 | } |
| 324 | 322 | |
@@ -146,8 +146,7 @@ discard block |
||
| 146 | 146 | $parentExpression, |
| 147 | 147 | AbstractExpression $expression = null, |
| 148 | 148 | $checkNullForMostChild = true |
| 149 | - ) |
|
| 150 | - { |
|
| 149 | + ) { |
|
| 151 | 150 | if ($expression instanceof ArithmeticExpression) { |
| 152 | 151 | return $this->processArithmeticNode($expression); |
| 153 | 152 | } elseif ($expression instanceof ConstantExpression) { |
@@ -222,8 +221,7 @@ discard block |
||
| 222 | 221 | private function mergeNullableExpressionTrees( |
| 223 | 222 | $nullCheckExpTree1, |
| 224 | 223 | $nullCheckExpTree2 |
| 225 | - ) |
|
| 226 | - { |
|
| 224 | + ) { |
|
| 227 | 225 | $this->mapTable = []; |
| 228 | 226 | $this->map($nullCheckExpTree1); |
| 229 | 227 | $this->map($nullCheckExpTree2); |
@@ -306,8 +304,7 @@ discard block |
||
| 306 | 304 | private function processFunctionCallNode( |
| 307 | 305 | FunctionCallExpression $expression, |
| 308 | 306 | $parentExpression |
| 309 | - ) |
|
| 310 | - { |
|
| 307 | + ) { |
|
| 311 | 308 | $paramExpressions = $expression->getParamExpressions(); |
| 312 | 309 | $checkNullForMostChild = strcmp($expression->getFunctionDescription()->name, 'is_null') === 0; |
| 313 | 310 | $resultExpression = null; |
@@ -349,8 +346,7 @@ discard block |
||
| 349 | 346 | private function processLogicalNode( |
| 350 | 347 | LogicalExpression $expression, |
| 351 | 348 | $parentExpression |
| 352 | - ) |
|
| 353 | - { |
|
| 349 | + ) { |
|
| 354 | 350 | $leftNullableExpTree = $this->processNodeForNullability($expression, $expression->getLeft()); |
| 355 | 351 | $rightNullableExpTree = $this->processNodeForNullability($expression, $expression->getRight()); |
| 356 | 352 | if ($expression->getNodeType() == ExpressionType::OR_LOGICAL()) { |
@@ -408,8 +404,7 @@ discard block |
||
| 408 | 404 | PropertyAccessExpression $expression, |
| 409 | 405 | $parentExpression, |
| 410 | 406 | $checkNullForMostChild |
| 411 | - ) |
|
| 412 | - { |
|
| 407 | + ) { |
|
| 413 | 408 | $navigationsUsed = $expression->getNavigationPropertiesInThePath(); |
| 414 | 409 | if (!empty($navigationsUsed)) { |
| 415 | 410 | $this->navigationPropertiesUsedInTheExpression[] = $navigationsUsed; |
@@ -442,8 +437,7 @@ discard block |
||
| 442 | 437 | private function processRelationalNode( |
| 443 | 438 | RelationalExpression $expression, |
| 444 | 439 | $parentExpression |
| 445 | - ) |
|
| 446 | - { |
|
| 440 | + ) { |
|
| 447 | 441 | $leftNullableExpTree = $this->processNodeForNullability($expression, $expression->getLeft()); |
| 448 | 442 | $rightNullableExpTree = $this->processNodeForNullability($expression, $expression->getRight()); |
| 449 | 443 | |
@@ -478,8 +472,7 @@ discard block |
||
| 478 | 472 | private function processUnaryNode( |
| 479 | 473 | UnaryExpression $expression, |
| 480 | 474 | $parentExpression |
| 481 | - ) |
|
| 482 | - { |
|
| 475 | + ) { |
|
| 483 | 476 | if (ExpressionType::NEGATE() == $expression->getNodeType()) { |
| 484 | 477 | return $this->processNodeForNullability($expression, $expression->getChild()); |
| 485 | 478 | } |
@@ -72,8 +72,7 @@ |
||
| 72 | 72 | callable $sorterFunction, |
| 73 | 73 | $dummyObject, |
| 74 | 74 | ResourceType $resourceType |
| 75 | - ) |
|
| 76 | - { |
|
| 75 | + ) { |
|
| 77 | 76 | $this->orderByInfo = $orderByInfo; |
| 78 | 77 | $this->sorterFunction = $sorterFunction; |
| 79 | 78 | $this->subSorterFunctions = $subSorterFunctions; |
@@ -35,8 +35,7 @@ |
||
| 35 | 35 | public function __construct( |
| 36 | 36 | ResourceSetWrapper $resourceSetWrapper, |
| 37 | 37 | ResourceType $baseResourceType |
| 38 | - ) |
|
| 39 | - { |
|
| 38 | + ) { |
|
| 40 | 39 | parent::__construct(null, null, $resourceSetWrapper); |
| 41 | 40 | $this->baseResourceType = $baseResourceType; |
| 42 | 41 | } |
@@ -120,8 +120,7 @@ |
||
| 120 | 120 | ResourceType $resourceType, |
| 121 | 121 | $orderBy, |
| 122 | 122 | ProvidersWrapper $providerWrapper |
| 123 | - ) |
|
| 124 | - { |
|
| 123 | + ) { |
|
| 125 | 124 | assert(is_string($orderBy), 'OrderBy clause must be a string'); |
| 126 | 125 | $orderBy = trim($orderBy); |
| 127 | 126 | if (0 == strlen($orderBy)) { |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | if ($flag1 && $flag2) { |
| 137 | 137 | return 0; |
| 138 | 138 | } elseif ($flag1) { |
| 139 | - return $ascend * -1; |
|
| 139 | + return $ascend*-1; |
|
| 140 | 140 | } elseif ($flag2) { |
| 141 | - return $ascend * 1; |
|
| 141 | + return $ascend*1; |
|
| 142 | 142 | } |
| 143 | 143 | $type = $this->resourceProperty->getInstanceType(); |
| 144 | 144 | if ($type instanceof DateTime) { |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | $result = strcmp($accessor1, $accessor2); |
| 150 | 150 | } else { |
| 151 | 151 | $delta = $accessor1 - $accessor2; |
| 152 | - $result = (0 == $delta) ? 0 : $delta / abs($delta); |
|
| 152 | + $result = (0 == $delta) ? 0 : $delta/abs($delta); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - return $ascend * $result; |
|
| 155 | + return $ascend*$result; |
|
| 156 | 156 | }; |
| 157 | 157 | |
| 158 | 158 | return $retVal; |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | $propertyName, |
| 51 | 51 | ResourceProperty $resourceProperty, |
| 52 | 52 | $isAscending |
| 53 | - ) |
|
| 54 | - { |
|
| 53 | + ) { |
|
| 55 | 54 | parent::__construct($propertyName, $resourceProperty); |
| 56 | 55 | $this->isAscending = $isAscending; |
| 57 | 56 | } |
@@ -194,8 +194,7 @@ discard block |
||
| 194 | 194 | $expressionToken, |
| 195 | 195 | $leftArgument, |
| 196 | 196 | $rightArgument |
| 197 | - ) |
|
| 198 | - { |
|
| 197 | + ) { |
|
| 199 | 198 | $function |
| 200 | 199 | = self::findFunctionWithPromotion( |
| 201 | 200 | self::arithmeticOperationFunctions(), |
@@ -225,8 +224,7 @@ discard block |
||
| 225 | 224 | $functionDescriptions, |
| 226 | 225 | $argExpressions, |
| 227 | 226 | $promoteArguments = true |
| 228 | - ) |
|
| 229 | - { |
|
| 227 | + ) { |
|
| 230 | 228 | $argCount = count($argExpressions); |
| 231 | 229 | $applicableFunctions = []; |
| 232 | 230 | foreach ($functionDescriptions as $functionDescription) { |
@@ -327,8 +325,7 @@ discard block |
||
| 327 | 325 | $expressionToken, |
| 328 | 326 | $leftArgument, |
| 329 | 327 | $rightArgument |
| 330 | - ) |
|
| 331 | - { |
|
| 328 | + ) { |
|
| 332 | 329 | $function = self::findFunctionWithPromotion( |
| 333 | 330 | self::logicalOperationFunctions(), |
| 334 | 331 | [$leftArgument, $rightArgument], |
@@ -371,8 +368,7 @@ discard block |
||
| 371 | 368 | $expressionToken, |
| 372 | 369 | $leftArgument, |
| 373 | 370 | $rightArgument |
| 374 | - ) |
|
| 375 | - { |
|
| 371 | + ) { |
|
| 376 | 372 | //for null operands only equality operators are allowed |
| 377 | 373 | $null = new Null1(); |
| 378 | 374 | if ($leftArgument->typeIs($null) || $rightArgument->typeIs($null)) { |
@@ -777,8 +773,7 @@ discard block |
||
| 777 | 773 | $functions, |
| 778 | 774 | $argExpressions, |
| 779 | 775 | $expressionToken |
| 780 | - ) |
|
| 781 | - { |
|
| 776 | + ) { |
|
| 782 | 777 | $function |
| 783 | 778 | = self::findFunctionWithPromotion($functions, $argExpressions, false); |
| 784 | 779 | if ($function == null) { |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | ResourceType &$resourceType, |
| 50 | 50 | InternalOrderByInfo &$internalOrderByInfo, |
| 51 | 51 | $skipToken |
| 52 | - ) |
|
| 53 | - { |
|
| 52 | + ) { |
|
| 54 | 53 | /** @var KeyDescriptor|null $tokenValueDescriptor */ |
| 55 | 54 | $tokenValueDescriptor = null; |
| 56 | 55 | if (!KeyDescriptor::tryParseValuesFromSkipToken( |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | $searchArraySize = count($searchArray) - 1; |
| 144 | 144 | $high = $searchArraySize; |
| 145 | 145 | do { |
| 146 | - $mid = intval($low + round(($high - $low) / 2)); |
|
| 146 | + $mid = intval($low + round(($high - $low)/2)); |
|
| 147 | 147 | $result = $comparer($keyObject, $searchArray[$mid]); |
| 148 | 148 | if ($result > 0) { |
| 149 | 149 | $low = $mid + 1; |
@@ -75,8 +75,7 @@ |
||
| 75 | 75 | InternalOrderByInfo &$internalOrderByInfo, |
| 76 | 76 | $orderByValuesInSkipToken, |
| 77 | 77 | ResourceType &$resourceType |
| 78 | - ) |
|
| 79 | - { |
|
| 78 | + ) { |
|
| 80 | 79 | $this->internalOrderByInfo = $internalOrderByInfo; |
| 81 | 80 | $this->orderByValuesInSkipToken = $orderByValuesInSkipToken; |
| 82 | 81 | $this->resourceType = $resourceType; |