@@ -621,10 +621,10 @@  | 
                                                    ||
| 621 | 621 |      { | 
                                                        
| 622 | 622 | $queryParameterString = null;  | 
                                                        
| 623 | 623 | foreach ([ODataConstants::HTTPQUERY_STRING_FILTER,  | 
                                                        
| 624 | - ODataConstants::HTTPQUERY_STRING_EXPAND,  | 
                                                        |
| 625 | - ODataConstants::HTTPQUERY_STRING_ORDERBY,  | 
                                                        |
| 626 | - ODataConstants::HTTPQUERY_STRING_INLINECOUNT,  | 
                                                        |
| 627 | -                     ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { | 
                                                        |
| 624 | + ODataConstants::HTTPQUERY_STRING_EXPAND,  | 
                                                        |
| 625 | + ODataConstants::HTTPQUERY_STRING_ORDERBY,  | 
                                                        |
| 626 | + ODataConstants::HTTPQUERY_STRING_INLINECOUNT,  | 
                                                        |
| 627 | +                        ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { | 
                                                        |
| 628 | 628 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption);  | 
                                                        
| 629 | 629 |              if (!is_null($value)) { | 
                                                        
| 630 | 630 |                  if (!is_null($queryParameterString)) { | 
                                                        
@@ -153,7 +153,7 @@ discard block  | 
                                                    ||
| 153 | 153 | }  | 
                                                        
| 154 | 154 | // despite all set up, checking, etc, if we haven't picked a concrete resource type,  | 
                                                        
| 155 | 155 | // wheels have fallen off, so blow up  | 
                                                        
| 156 | - assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload '.$payloadClass);  | 
                                                        |
| 156 | + assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload ' . $payloadClass);  | 
                                                        |
| 157 | 157 | }  | 
                                                        
| 158 | 158 | |
| 159 | 159 | $rawProp = $resourceType->getAllProperties();  | 
                                                        
@@ -200,7 +200,7 @@ discard block  | 
                                                    ||
| 200 | 200 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'  | 
                                                        
| 201 | 201 | );  | 
                                                        
| 202 | 202 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';  | 
                                                        
| 203 | - $propType = 'application/atom+xml;type='.$propTail;  | 
                                                        |
| 203 | + $propType = 'application/atom+xml;type=' . $propTail;  | 
                                                        |
| 204 | 204 | $propName = $prop->getName();  | 
                                                        
| 205 | 205 | $nuLink->title = $propName;  | 
                                                        
| 206 | 206 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;  | 
                                                        
@@ -243,7 +243,7 @@ discard block  | 
                                                    ||
| 243 | 243 | *  | 
                                                        
| 244 | 244 | * @return ODataFeed  | 
                                                        
| 245 | 245 | */  | 
                                                        
| 246 | - public function writeTopLevelElements(QueryResult &$entryObjects)  | 
                                                        |
| 246 | + public function writeTopLevelElements(QueryResult & $entryObjects)  | 
                                                        |
| 247 | 247 |      { | 
                                                        
| 248 | 248 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)');  | 
                                                        
| 249 | 249 | |
@@ -280,7 +280,7 @@ discard block  | 
                                                    ||
| 280 | 280 | $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet();  | 
                                                        
| 281 | 281 | $requestTop = $this->getRequest()->getTopOptionCount();  | 
                                                        
| 282 | 282 | $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet);  | 
                                                        
| 283 | - $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop;  | 
                                                        |
| 283 | + $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop;  | 
                                                        |
| 284 | 284 | |
| 285 | 285 |          if (true === $entryObjects->hasMore && $requestTop > $pageSize) { | 
                                                        
| 286 | 286 | $stackSegment = $setName;  | 
                                                        
@@ -363,7 +363,7 @@ discard block  | 
                                                    ||
| 363 | 363 | *  | 
                                                        
| 364 | 364 | * @return ODataPropertyContent  | 
                                                        
| 365 | 365 | */  | 
                                                        
| 366 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)  | 
                                                        |
| 366 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)  | 
                                                        |
| 367 | 367 |      { | 
                                                        
| 368 | 368 | $result = $complexValue->results;  | 
                                                        
| 369 | 369 | |
@@ -392,14 +392,14 @@ discard block  | 
                                                    ||
| 392 | 392 | * bag object  | 
                                                        
| 393 | 393 | * @return ODataPropertyContent  | 
                                                        
| 394 | 394 | */  | 
                                                        
| 395 | - public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType)  | 
                                                        |
| 395 | + public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)  | 
                                                        |
| 396 | 396 |      { | 
                                                        
| 397 | 397 | $result = $BagValue->results;  | 
                                                        
| 398 | 398 | |
| 399 | 399 | $propertyContent = new ODataPropertyContent();  | 
                                                        
| 400 | 400 | $odataProperty = new ODataProperty();  | 
                                                        
| 401 | 401 | $odataProperty->name = $propertyName;  | 
                                                        
| 402 | -        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; | 
                                                        |
| 402 | +        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; | 
                                                        |
| 403 | 403 | $odataProperty->value = $this->writeBagValue($resourceType, $result);  | 
                                                        
| 404 | 404 | |
| 405 | 405 | $propertyContent->properties[] = $odataProperty;  | 
                                                        
@@ -415,7 +415,7 @@ discard block  | 
                                                    ||
| 415 | 415 | * primitive property to be written  | 
                                                        
| 416 | 416 | * @return ODataPropertyContent  | 
                                                        
| 417 | 417 | */  | 
                                                        
| 418 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)  | 
                                                        |
| 418 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)  | 
                                                        |
| 419 | 419 |      { | 
                                                        
| 420 | 420 | assert(null != $resourceProperty, 'Resource property must not be null');  | 
                                                        
| 421 | 421 | $propertyContent = new ODataPropertyContent();  | 
                                                        
@@ -665,7 +665,7 @@ discard block  | 
                                                    ||
| 665 | 665 | $segmentWrappers = $this->getStack()->getSegmentWrappers();  | 
                                                        
| 666 | 666 | $count = count($segmentWrappers);  | 
                                                        
| 667 | 667 | |
| 668 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1];  | 
                                                        |
| 668 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1];  | 
                                                        |
| 669 | 669 | }  | 
                                                        
| 670 | 670 | |
| 671 | 671 | /**  | 
                                                        
@@ -690,7 +690,7 @@ discard block  | 
                                                    ||
| 690 | 690 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);  | 
                                                        
| 691 | 691 | assert(!is_null($skipToken), '!is_null($skipToken)');  | 
                                                        
| 692 | 692 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';  | 
                                                        
| 693 | - $skipToken = '?'.$queryParameterString.$token.$skipToken;  | 
                                                        |
| 693 | + $skipToken = '?' . $queryParameterString . $token . $skipToken;  | 
                                                        |
| 694 | 694 | |
| 695 | 695 | return $skipToken;  | 
                                                        
| 696 | 696 | }  | 
                                                        
@@ -724,7 +724,7 @@ discard block  | 
                                                    ||
| 724 | 724 | |
| 725 | 725 | $topCountValue = $this->getRequest()->getTopOptionCount();  | 
                                                        
| 726 | 726 |          if (!is_null($topCountValue)) { | 
                                                        
| 727 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount();  | 
                                                        |
| 727 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount();  | 
                                                        |
| 728 | 728 |              if (0 < $remainingCount) { | 
                                                        
| 729 | 729 |                  if (!is_null($queryParameterString)) { | 
                                                        
| 730 | 730 | $queryParameterString .= '&';  | 
                                                        
@@ -759,7 +759,7 @@ discard block  | 
                                                    ||
| 759 | 759 | *  | 
                                                        
| 760 | 760 | * @return string  | 
                                                        
| 761 | 761 | */  | 
                                                        
| 762 | - private function primitiveToString(IType &$type, $primitiveValue)  | 
                                                        |
| 762 | + private function primitiveToString(IType & $type, $primitiveValue)  | 
                                                        |
| 763 | 763 |      { | 
                                                        
| 764 | 764 |          if ($type instanceof Boolean) { | 
                                                        
| 765 | 765 | $stringValue = (true === $primitiveValue) ? 'true' : 'false';  | 
                                                        
@@ -853,7 +853,7 @@ discard block  | 
                                                    ||
| 853 | 853 | * @param $result  | 
                                                        
| 854 | 854 | * @return ODataBagContent|null  | 
                                                        
| 855 | 855 | */  | 
                                                        
| 856 | - protected function writeBagValue(ResourceType &$resourceType, $result)  | 
                                                        |
| 856 | + protected function writeBagValue(ResourceType & $resourceType, $result)  | 
                                                        |
| 857 | 857 |      { | 
                                                        
| 858 | 858 | assert(null == $result || is_array($result), 'Bag parameter must be null or array');  | 
                                                        
| 859 | 859 | $typeKind = $resourceType->getResourceTypeKind();  | 
                                                        
@@ -886,7 +886,7 @@ discard block  | 
                                                    ||
| 886 | 886 | * @param string|null $propertyName  | 
                                                        
| 887 | 887 | * @return ODataPropertyContent  | 
                                                        
| 888 | 888 | */  | 
                                                        
| 889 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)  | 
                                                        |
| 889 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)  | 
                                                        |
| 890 | 890 |      { | 
                                                        
| 891 | 891 | assert(is_object($result), 'Supplied $customObject must be an object');  | 
                                                        
| 892 | 892 | |
@@ -58,9 +58,9 @@  | 
                                                    ||
| 58 | 58 | $cerealRequest = serialize($request);  | 
                                                        
| 59 | 59 | $cerealMeta = serialize($meta);  | 
                                                        
| 60 | 60 | $cerealResponse = serialize($odataResponse);  | 
                                                        
| 61 | - Storage::put($xTest.'request', $cerealRequest);  | 
                                                        |
| 62 | - Storage::put($xTest.'metadata', $cerealMeta);  | 
                                                        |
| 63 | - Storage::put($xTest.'response', $cerealResponse);  | 
                                                        |
| 61 | + Storage::put($xTest . 'request', $cerealRequest);  | 
                                                        |
| 62 | + Storage::put($xTest . 'metadata', $cerealMeta);  | 
                                                        |
| 63 | + Storage::put($xTest . 'response', $cerealResponse);  | 
                                                        |
| 64 | 64 | }  | 
                                                        
| 65 | 65 | }  | 
                                                        
| 66 | 66 | |
@@ -53,7 +53,7 @@  | 
                                                    ||
| 53 | 53 |                  foreach ($lock as $barrel => $roll) { | 
                                                        
| 54 | 54 | assert(  | 
                                                        
| 55 | 55 | !array_key_exists($barrel, $metamix[$key]),  | 
                                                        
| 56 | - 'Mapping already defined for model '.$key.' and CRUD verb '.$barrel  | 
                                                        |
| 56 | + 'Mapping already defined for model ' . $key . ' and CRUD verb ' . $barrel  | 
                                                        |
| 57 | 57 | );  | 
                                                        
| 58 | 58 | $metamix[$key][$barrel] = $roll;  | 
                                                        
| 59 | 59 | }  | 
                                                        
@@ -310,12 +310,12 @@ discard block  | 
                                                    ||
| 310 | 310 | $map = $raw->getMetadata();  | 
                                                        
| 311 | 311 | |
| 312 | 312 |          if (!array_key_exists($class, $map)) { | 
                                                        
| 313 | -            throw new \POData\Common\InvalidOperationException('Controller mapping missing for class '.$class.'.'); | 
                                                        |
| 313 | +            throw new \POData\Common\InvalidOperationException('Controller mapping missing for class ' . $class . '.'); | 
                                                        |
| 314 | 314 | }  | 
                                                        
| 315 | 315 | $goal = $raw->getMapping($class, $verb);  | 
                                                        
| 316 | 316 |          if (null == $goal) { | 
                                                        
| 317 | 317 | throw new \POData\Common\InvalidOperationException(  | 
                                                        
| 318 | - 'Controller mapping missing for '.$verb.' verb on class '.$class.'.'  | 
                                                        |
| 318 | + 'Controller mapping missing for ' . $verb . ' verb on class ' . $class . '.'  | 
                                                        |
| 319 | 319 | );  | 
                                                        
| 320 | 320 | }  | 
                                                        
| 321 | 321 | |
@@ -391,7 +391,7 @@ discard block  | 
                                                    ||
| 391 | 391 | throw new ODataException($e->getMessage(), 500);  | 
                                                        
| 392 | 392 | }  | 
                                                        
| 393 | 393 | }  | 
                                                        
| 394 | -        throw new ODataException('Target model not successfully '.$lastWord, 422); | 
                                                        |
| 394 | +        throw new ODataException('Target model not successfully ' . $lastWord, 422); | 
                                                        |
| 395 | 395 | }  | 
                                                        
| 396 | 396 | |
| 397 | 397 | /**  | 
                                                        
@@ -434,7 +434,7 @@ discard block  | 
                                                    ||
| 434 | 434 | }  | 
                                                        
| 435 | 435 | $outData = $result->getData();  | 
                                                        
| 436 | 436 |          if (is_object($outData)) { | 
                                                        
| 437 | - $outData = (array)$outData;  | 
                                                        |
| 437 | + $outData = (array) $outData;  | 
                                                        |
| 438 | 438 | }  | 
                                                        
| 439 | 439 | |
| 440 | 440 |          if (!is_array($outData)) { | 
                                                        
@@ -56,7 +56,7 @@  | 
                                                    ||
| 56 | 56 | };  | 
                                                        
| 57 | 57 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_ENDSWITH] = function ($params) { | 
                                                        
| 58 | 58 |              return '(strcmp(substr('.$params[0].', strlen('.$params[0].') - strlen('.$params[1].')), ' | 
                                                        
| 59 | - .$params[1].') === 0)';  | 
                                                        |
| 59 | + .$params[1].') === 0)';  | 
                                                        |
| 60 | 60 | };  | 
                                                        
| 61 | 61 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_INDEXOF] = function ($params) { | 
                                                        
| 62 | 62 |              return 'strpos('.$params[0].', '.$params[1].')'; | 
                                                        
@@ -52,81 +52,81 @@ discard block  | 
                                                    ||
| 52 | 52 | public function __construct()  | 
                                                        
| 53 | 53 |      { | 
                                                        
| 54 | 54 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_COMPARE] = function ($params) { | 
                                                        
| 55 | -            return 'strcmp('.$params[0].', '.$params[1].')'; | 
                                                        |
| 55 | +            return 'strcmp(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 56 | 56 | };  | 
                                                        
| 57 | 57 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_ENDSWITH] = function ($params) { | 
                                                        
| 58 | -            return '(strcmp(substr('.$params[0].', strlen('.$params[0].') - strlen('.$params[1].')), ' | 
                                                        |
| 59 | - .$params[1].') === 0)';  | 
                                                        |
| 58 | +            return '(strcmp(substr(' . $params[0] . ', strlen(' . $params[0] . ') - strlen(' . $params[1] . ')), ' | 
                                                        |
| 59 | + .$params[1] . ') === 0)';  | 
                                                        |
| 60 | 60 | };  | 
                                                        
| 61 | 61 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_INDEXOF] = function ($params) { | 
                                                        
| 62 | -            return 'strpos('.$params[0].', '.$params[1].')'; | 
                                                        |
| 62 | +            return 'strpos(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 63 | 63 | };  | 
                                                        
| 64 | 64 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_REPLACE] = function ($params) { | 
                                                        
| 65 | -            return 'str_replace('.$params[1].', '.$params[2].', '.$params[0].')'; | 
                                                        |
| 65 | +            return 'str_replace(' . $params[1] . ', ' . $params[2] . ', ' . $params[0] . ')'; | 
                                                        |
| 66 | 66 | };  | 
                                                        
| 67 | 67 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_STARTSWITH] = function ($params) { | 
                                                        
| 68 | -            return '(strpos('.$params[0].', '.$params[1].') === 0)'; | 
                                                        |
| 68 | +            return '(strpos(' . $params[0] . ', ' . $params[1] . ') === 0)'; | 
                                                        |
| 69 | 69 | };  | 
                                                        
| 70 | 70 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_TOLOWER] = function ($params) { | 
                                                        
| 71 | -            return 'strtolower('.$params[0].')'; | 
                                                        |
| 71 | +            return 'strtolower(' . $params[0] . ')'; | 
                                                        |
| 72 | 72 | };  | 
                                                        
| 73 | 73 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_TOUPPER] = function ($params) { | 
                                                        
| 74 | -            return 'strtoupper('.$params[0].')'; | 
                                                        |
| 74 | +            return 'strtoupper(' . $params[0] . ')'; | 
                                                        |
| 75 | 75 | };  | 
                                                        
| 76 | 76 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_TRIM] = function ($params) { | 
                                                        
| 77 | -            return 'trim('.$params[0].')'; | 
                                                        |
| 77 | +            return 'trim(' . $params[0] . ')'; | 
                                                        |
| 78 | 78 | };  | 
                                                        
| 79 | 79 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_SUBSTRING] = function ($params) { | 
                                                        
| 80 | 80 | return count($params) == 3 ?  | 
                                                        
| 81 | -                'substr('.$params[0].', '.$params[1].', '.$params[2].')' : 'substr('.$params[0].', '.$params[1].')'; | 
                                                        |
| 81 | +                'substr(' . $params[0] . ', ' . $params[1] . ', ' . $params[2] . ')' : 'substr(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 82 | 82 | };  | 
                                                        
| 83 | 83 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_SUBSTRINGOF] = function ($params) { | 
                                                        
| 84 | -            return '(strpos('.$params[1].', '.$params[0].') !== false)'; | 
                                                        |
| 84 | +            return '(strpos(' . $params[1] . ', ' . $params[0] . ') !== false)'; | 
                                                        |
| 85 | 85 | };  | 
                                                        
| 86 | 86 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_CONCAT] = function ($params) { | 
                                                        
| 87 | - return $params[0].' . '.$params[1];  | 
                                                        |
| 87 | + return $params[0] . ' . ' . $params[1];  | 
                                                        |
| 88 | 88 | };  | 
                                                        
| 89 | 89 |          $this->functionDescriptionParsers[ODataConstants::STRFUN_LENGTH] = function ($params) { | 
                                                        
| 90 | -            return 'strlen('.$params[0].')'; | 
                                                        |
| 90 | +            return 'strlen(' . $params[0] . ')'; | 
                                                        |
| 91 | 91 | };  | 
                                                        
| 92 | 92 |          $this->functionDescriptionParsers[ODataConstants::GUIDFUN_EQUAL] = function ($params) { | 
                                                        
| 93 | -            return self::TYPE_NAMESPACE.'Guid::guidEqual('.$params[0].', '.$params[1].')'; | 
                                                        |
| 93 | +            return self::TYPE_NAMESPACE . 'Guid::guidEqual(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 94 | 94 | };  | 
                                                        
| 95 | 95 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_COMPARE] = function ($params) { | 
                                                        
| 96 | -            return self::TYPE_NAMESPACE.'DateTime::dateTimeCmp('.$params[0].', '.$params[1].')'; | 
                                                        |
| 96 | +            return self::TYPE_NAMESPACE . 'DateTime::dateTimeCmp(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 97 | 97 | };  | 
                                                        
| 98 | 98 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_YEAR] = function ($params) { | 
                                                        
| 99 | -            return self::TYPE_NAMESPACE.'DateTime::year('.$params[0].')'; | 
                                                        |
| 99 | +            return self::TYPE_NAMESPACE . 'DateTime::year(' . $params[0] . ')'; | 
                                                        |
| 100 | 100 | };  | 
                                                        
| 101 | 101 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_MONTH] = function ($params) { | 
                                                        
| 102 | -            return self::TYPE_NAMESPACE.'DateTime::month('.$params[0].')'; | 
                                                        |
| 102 | +            return self::TYPE_NAMESPACE . 'DateTime::month(' . $params[0] . ')'; | 
                                                        |
| 103 | 103 | };  | 
                                                        
| 104 | 104 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_DAY] = function ($params) { | 
                                                        
| 105 | -            return self::TYPE_NAMESPACE.'DateTime::day('.$params[0].')'; | 
                                                        |
| 105 | +            return self::TYPE_NAMESPACE . 'DateTime::day(' . $params[0] . ')'; | 
                                                        |
| 106 | 106 | };  | 
                                                        
| 107 | 107 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_HOUR] = function ($params) { | 
                                                        
| 108 | -            return self::TYPE_NAMESPACE.'DateTime::hour('.$params[0].')'; | 
                                                        |
| 108 | +            return self::TYPE_NAMESPACE . 'DateTime::hour(' . $params[0] . ')'; | 
                                                        |
| 109 | 109 | };  | 
                                                        
| 110 | 110 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_MINUTE] = function ($params) { | 
                                                        
| 111 | -            return self::TYPE_NAMESPACE.'DateTime::minute('.$params[0].')'; | 
                                                        |
| 111 | +            return self::TYPE_NAMESPACE . 'DateTime::minute(' . $params[0] . ')'; | 
                                                        |
| 112 | 112 | };  | 
                                                        
| 113 | 113 |          $this->functionDescriptionParsers[ODataConstants::DATETIME_SECOND] = function ($params) { | 
                                                        
| 114 | -            return self::TYPE_NAMESPACE.'DateTime::second('.$params[0].')'; | 
                                                        |
| 114 | +            return self::TYPE_NAMESPACE . 'DateTime::second(' . $params[0] . ')'; | 
                                                        |
| 115 | 115 | };  | 
                                                        
| 116 | 116 |          $this->functionDescriptionParsers[ODataConstants::MATHFUN_ROUND] = function ($params) { | 
                                                        
| 117 | -            return 'round('.$params[0].')'; | 
                                                        |
| 117 | +            return 'round(' . $params[0] . ')'; | 
                                                        |
| 118 | 118 | };  | 
                                                        
| 119 | 119 |          $this->functionDescriptionParsers[ODataConstants::MATHFUN_CEILING] = function ($params) { | 
                                                        
| 120 | -            return 'ceil('.$params[0].')'; | 
                                                        |
| 120 | +            return 'ceil(' . $params[0] . ')'; | 
                                                        |
| 121 | 121 | };  | 
                                                        
| 122 | 122 |          $this->functionDescriptionParsers[ODataConstants::MATHFUN_FLOOR] = function ($params) { | 
                                                        
| 123 | -            return 'floor('.$params[0].')'; | 
                                                        |
| 123 | +            return 'floor(' . $params[0] . ')'; | 
                                                        |
| 124 | 124 | };  | 
                                                        
| 125 | 125 |          $this->functionDescriptionParsers[ODataConstants::BINFUL_EQUAL] = function ($params) { | 
                                                        
| 126 | -            return self::TYPE_NAMESPACE.'Binary::binaryEqual('.$params[0].', '.$params[1].')'; | 
                                                        |
| 126 | +            return self::TYPE_NAMESPACE . 'Binary::binaryEqual(' . $params[0] . ', ' . $params[1] . ')'; | 
                                                        |
| 127 | 127 | };  | 
                                                        
| 128 | 128 |          $this->functionDescriptionParsers['is_null'] = function ($params) { | 
                                                        
| 129 | -            return 'is_null('.$params[0].')'; | 
                                                        |
| 129 | +            return 'is_null(' . $params[0] . ')'; | 
                                                        |
| 130 | 130 | };  | 
                                                        
| 131 | 131 | }  | 
                                                        
| 132 | 132 | /**  | 
                                                        
@@ -157,7 +157,7 @@ discard block  | 
                                                    ||
| 157 | 157 | */  | 
                                                        
| 158 | 158 | public function setResourceType(ResourceType $resourceType)  | 
                                                        
| 159 | 159 |      { | 
                                                        
| 160 | - $this->iteratorName = '$'.$resourceType->getName();  | 
                                                        |
| 160 | + $this->iteratorName = '$' . $resourceType->getName();  | 
                                                        |
| 161 | 161 | $this->resourceType = $resourceType;  | 
                                                        
| 162 | 162 | }  | 
                                                        
| 163 | 163 | /**  | 
                                                        
@@ -282,11 +282,11 @@ discard block  | 
                                                    ||
| 282 | 282 | $parent = $expression;  | 
                                                        
| 283 | 283 | $variable = null;  | 
                                                        
| 284 | 284 |          do { | 
                                                        
| 285 | - $variable = $parent->getResourceProperty()->getName().self::MEMBER_ACCESS.$variable;  | 
                                                        |
| 285 | + $variable = $parent->getResourceProperty()->getName() . self::MEMBER_ACCESS . $variable;  | 
                                                        |
| 286 | 286 | $parent = $parent->getParent();  | 
                                                        
| 287 | 287 | } while ($parent != null);  | 
                                                        
| 288 | 288 | $variable = rtrim($variable, self::MEMBER_ACCESS);  | 
                                                        
| 289 | - $variable = $this->getIteratorName().self::MEMBER_ACCESS.$variable;  | 
                                                        |
| 289 | + $variable = $this->getIteratorName() . self::MEMBER_ACCESS . $variable;  | 
                                                        |
| 290 | 290 | return $variable;  | 
                                                        
| 291 | 291 | }  | 
                                                        
| 292 | 292 | /**  | 
                                                        
@@ -318,7 +318,7 @@ discard block  | 
                                                    ||
| 318 | 318 | */  | 
                                                        
| 319 | 319 | private function prepareBinaryExpression($operator, $left, $right)  | 
                                                        
| 320 | 320 |      { | 
                                                        
| 321 | - return self::OPEN_BRACKET.$left.' '.$operator.' '.$right.self::CLOSE_BRACKET;  | 
                                                        |
| 321 | + return self::OPEN_BRACKET . $left . ' ' . $operator . ' ' . $right . self::CLOSE_BRACKET;  | 
                                                        |
| 322 | 322 | }  | 
                                                        
| 323 | 323 | /**  | 
                                                        
| 324 | 324 | * To format unary expression.  | 
                                                        
@@ -330,6 +330,6 @@ discard block  | 
                                                    ||
| 330 | 330 | */  | 
                                                        
| 331 | 331 | private function prepareUnaryExpression($operator, $child)  | 
                                                        
| 332 | 332 |      { | 
                                                        
| 333 | - return $operator.self::OPEN_BRACKET.$child.self::CLOSE_BRACKET;  | 
                                                        |
| 333 | + return $operator . self::OPEN_BRACKET . $child . self::CLOSE_BRACKET;  | 
                                                        |
| 334 | 334 | }  | 
                                                        
| 335 | 335 | }  | 
                                                        
@@ -35,27 +35,27 @@ discard block  | 
                                                    ||
| 35 | 35 | assert(0 < count($this->mapping), 'Mapping array must not be empty');  | 
                                                        
| 36 | 36 | |
| 37 | 37 |          if (!array_key_exists($modelName, $this->mapping)) { | 
                                                        
| 38 | -            throw new \Exception('Metadata mapping for model '.$modelName.' not defined'); | 
                                                        |
| 38 | +            throw new \Exception('Metadata mapping for model ' . $modelName . ' not defined'); | 
                                                        |
| 39 | 39 | }  | 
                                                        
| 40 | 40 | |
| 41 | 41 | $this->checkCrudVerbDefined($crudVerb);  | 
                                                        
| 42 | 42 | |
| 43 | 43 | $lookup = $this->mapping[$modelName];  | 
                                                        
| 44 | 44 |          if (!is_array($lookup)) { | 
                                                        
| 45 | -            throw new \Exception('Metadata mapping for model '.$modelName.' not an array'); | 
                                                        |
| 45 | +            throw new \Exception('Metadata mapping for model ' . $modelName . ' not an array'); | 
                                                        |
| 46 | 46 | }  | 
                                                        
| 47 | 47 | |
| 48 | 48 |          if (!array_key_exists($crudVerb, $lookup)) { | 
                                                        
| 49 | -            throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' not defined'); | 
                                                        |
| 49 | +            throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' not defined'); | 
                                                        |
| 50 | 50 | }  | 
                                                        
| 51 | 51 | $result = $lookup[$crudVerb];  | 
                                                        
| 52 | 52 |          if (!isset($result)) { | 
                                                        
| 53 | -            throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' null'); | 
                                                        |
| 53 | +            throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' null'); | 
                                                        |
| 54 | 54 | }  | 
                                                        
| 55 | 55 | |
| 56 | 56 |          if (!method_exists($this, $result)) { | 
                                                        
| 57 | 57 | throw new \Exception(  | 
                                                        
| 58 | - 'Metadata target for CRUD verb '.$crudVerb.' on model '.$modelName.' does not exist'  | 
                                                        |
| 58 | + 'Metadata target for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' does not exist'  | 
                                                        |
| 59 | 59 | );  | 
                                                        
| 60 | 60 | }  | 
                                                        
| 61 | 61 | |
@@ -77,17 +77,17 @@ discard block  | 
                                                    ||
| 77 | 77 | // check that mapping array is well formed and sane, rather than waiting to stab us with a spatula  | 
                                                        
| 78 | 78 |          foreach ($this->mapping as $key => $map) { | 
                                                        
| 79 | 79 |              if (!is_array($map)) { | 
                                                        
| 80 | -                throw new \Exception('Metadata mapping for model '.$key.' not an array'); | 
                                                        |
| 80 | +                throw new \Exception('Metadata mapping for model ' . $key . ' not an array'); | 
                                                        |
| 81 | 81 | }  | 
                                                        
| 82 | 82 |              foreach ($map as $verb => $method) { | 
                                                        
| 83 | 83 | $this->checkCrudVerbDefined($verb);  | 
                                                        
| 84 | 84 |                  if (!isset($method)) { | 
                                                        
| 85 | -                    throw new \Exception('Metadata mapping for CRUD verb '.$verb.' on model '.$key.' null'); | 
                                                        |
| 85 | +                    throw new \Exception('Metadata mapping for CRUD verb ' . $verb . ' on model ' . $key . ' null'); | 
                                                        |
| 86 | 86 | }  | 
                                                        
| 87 | 87 | |
| 88 | 88 |                  if (!method_exists($this, $method)) { | 
                                                        
| 89 | 89 | throw new \Exception(  | 
                                                        
| 90 | - 'Metadata target for CRUD verb '.$verb.' on model '.$key.' does not exist'  | 
                                                        |
| 90 | + 'Metadata target for CRUD verb ' . $verb . ' on model ' . $key . ' does not exist'  | 
                                                        |
| 91 | 91 | );  | 
                                                        
| 92 | 92 | }  | 
                                                        
| 93 | 93 | $parmArray = $this->getParameterNames($method);  | 
                                                        
@@ -301,17 +301,17 @@  | 
                                                    ||
| 301 | 301 | $lastCode = $code[strlen($code) - 1];  | 
                                                        
| 302 | 302 |                          assert('}' == $lastCode, 'Final character of function definition must be closing brace'); | 
                                                        
| 303 | 303 | foreach ([  | 
                                                        
| 304 | - 'hasMany',  | 
                                                        |
| 305 | - 'hasManyThrough',  | 
                                                        |
| 306 | - 'belongsToMany',  | 
                                                        |
| 307 | - 'hasOne',  | 
                                                        |
| 308 | - 'belongsTo',  | 
                                                        |
| 309 | - 'morphOne',  | 
                                                        |
| 310 | - 'morphTo',  | 
                                                        |
| 311 | - 'morphMany',  | 
                                                        |
| 312 | - 'morphToMany',  | 
                                                        |
| 313 | - 'morphedByMany'  | 
                                                        |
| 314 | -                                 ] as $relation) { | 
                                                        |
| 304 | + 'hasMany',  | 
                                                        |
| 305 | + 'hasManyThrough',  | 
                                                        |
| 306 | + 'belongsToMany',  | 
                                                        |
| 307 | + 'hasOne',  | 
                                                        |
| 308 | + 'belongsTo',  | 
                                                        |
| 309 | + 'morphOne',  | 
                                                        |
| 310 | + 'morphTo',  | 
                                                        |
| 311 | + 'morphMany',  | 
                                                        |
| 312 | + 'morphToMany',  | 
                                                        |
| 313 | + 'morphedByMany'  | 
                                                        |
| 314 | +                                    ] as $relation) { | 
                                                        |
| 315 | 315 |                              $search = '$this->' . $relation . '('; | 
                                                        
| 316 | 316 |                              if ($pos = stripos($code, $search)) { | 
                                                        
| 317 | 317 | //Resolve the relation's model to a Relation object.  | 
                                                        
@@ -284,7 +284,7 @@ discard block  | 
                                                    ||
| 284 | 284 | $reflection = new \ReflectionMethod($model, $method);  | 
                                                        
| 285 | 285 | |
| 286 | 286 | $file = new \SplFileObject($reflection->getFileName());  | 
                                                        
| 287 | - $file->seek($reflection->getStartLine() - 1);  | 
                                                        |
| 287 | + $file->seek($reflection->getStartLine()-1);  | 
                                                        |
| 288 | 288 | $code = '';  | 
                                                        
| 289 | 289 |                          while ($file->key() < $reflection->getEndLine()) { | 
                                                        
| 290 | 290 | $code .= $file->current();  | 
                                                        
@@ -297,8 +297,8 @@ discard block  | 
                                                    ||
| 297 | 297 | 'Function definition must have keyword \'function\''  | 
                                                        
| 298 | 298 | );  | 
                                                        
| 299 | 299 |                          $begin = strpos($code, 'function('); | 
                                                        
| 300 | - $code = substr($code, $begin, strrpos($code, '}') - $begin + 1);  | 
                                                        |
| 301 | - $lastCode = $code[strlen($code) - 1];  | 
                                                        |
| 300 | + $code = substr($code, $begin, strrpos($code, '}')-$begin+1);  | 
                                                        |
| 301 | + $lastCode = $code[strlen($code)-1];  | 
                                                        |
| 302 | 302 |                          assert('}' == $lastCode, 'Final character of function definition must be closing brace'); | 
                                                        
| 303 | 303 | foreach ([  | 
                                                        
| 304 | 304 | 'hasMany',  | 
                                                        
@@ -463,7 +463,7 @@ discard block  | 
                                                    ||
| 463 | 463 | break;  | 
                                                        
| 464 | 464 | }  | 
                                                        
| 465 | 465 | }  | 
                                                        
| 466 | - assert(in_array($fkMethodName, $methodList), 'Selected method, '.$fkMethodName.', not in method list');  | 
                                                        |
| 466 | + assert(in_array($fkMethodName, $methodList), 'Selected method, ' . $fkMethodName . ', not in method list');  | 
                                                        |
| 467 | 467 | $rkMethodName = 'getQualifiedRelatedPivotKeyName';  | 
                                                        
| 468 | 468 |                  foreach ($rkList as $option) { | 
                                                        
| 469 | 469 |                      if (in_array($option, $methodList)) { | 
                                                        
@@ -471,7 +471,7 @@ discard block  | 
                                                    ||
| 471 | 471 | break;  | 
                                                        
| 472 | 472 | }  | 
                                                        
| 473 | 473 | }  | 
                                                        
| 474 | - assert(in_array($rkMethodName, $methodList), 'Selected method, '.$rkMethodName.', not in method list');  | 
                                                        |
| 474 | + assert(in_array($rkMethodName, $methodList), 'Selected method, ' . $rkMethodName . ', not in method list');  | 
                                                        |
| 475 | 475 | $line = ['fk' => $fkMethodName, 'rk' => $rkMethodName];  | 
                                                        
| 476 | 476 | static::$methodPrimary[get_class($foo)] = $line;  | 
                                                        
| 477 | 477 | }  | 
                                                        
@@ -500,7 +500,7 @@ discard block  | 
                                                    ||
| 500 | 500 | break;  | 
                                                        
| 501 | 501 | }  | 
                                                        
| 502 | 502 | }  | 
                                                        
| 503 | - assert(in_array($fkMethodName, $methodList), 'Selected method, '.$fkMethodName.', not in method list');  | 
                                                        |
| 503 | + assert(in_array($fkMethodName, $methodList), 'Selected method, ' . $fkMethodName . ', not in method list');  | 
                                                        |
| 504 | 504 | $rkMethodName = 'getQualifiedParentKeyName';  | 
                                                        
| 505 | 505 |                  foreach ($rkList as $option) { | 
                                                        
| 506 | 506 |                      if (in_array($option, $methodList)) { | 
                                                        
@@ -508,7 +508,7 @@ discard block  | 
                                                    ||
| 508 | 508 | break;  | 
                                                        
| 509 | 509 | }  | 
                                                        
| 510 | 510 | }  | 
                                                        
| 511 | - assert(in_array($rkMethodName, $methodList), 'Selected method, '.$rkMethodName.', not in method list');  | 
                                                        |
| 511 | + assert(in_array($rkMethodName, $methodList), 'Selected method, ' . $rkMethodName . ', not in method list');  | 
                                                        |
| 512 | 512 | $line = ['fk' => $fkMethodName, 'rk' => $rkMethodName];  | 
                                                        
| 513 | 513 | static::$methodAlternate[get_class($foo)] = $line;  | 
                                                        
| 514 | 514 | }  | 
                                                        
@@ -555,10 +555,10 @@ discard block  | 
                                                    ||
| 555 | 555 | |
| 556 | 556 | $keyRaw = $isBelong ? $foo->$fkMethodName() : $foo->$fkMethodAlternate();  | 
                                                        
| 557 | 557 |              $keySegments = explode('.', $keyRaw); | 
                                                        
| 558 | - $keyName = $keySegments[count($keySegments) - 1];  | 
                                                        |
| 558 | + $keyName = $keySegments[count($keySegments)-1];  | 
                                                        |
| 559 | 559 | $localRaw = $isBelong ? $foo->$rkMethodName() : $foo->$rkMethodAlternate();  | 
                                                        
| 560 | 560 |              $localSegments = explode('.', $localRaw); | 
                                                        
| 561 | - $localName = $localSegments[count($localSegments) - 1];  | 
                                                        |
| 561 | + $localName = $localSegments[count($localSegments)-1];  | 
                                                        |
| 562 | 562 | $first = $keyName;  | 
                                                        
| 563 | 563 | $last = $localName;  | 
                                                        
| 564 | 564 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ);  | 
                                                        
@@ -584,10 +584,10 @@ discard block  | 
                                                    ||
| 584 | 584 | |
| 585 | 585 | $keyName = $isBelong ? $foo->$fkMethodName() : $foo->$fkMethodAlternate();  | 
                                                        
| 586 | 586 |              $keySegments = explode('.', $keyName); | 
                                                        
| 587 | - $keyName = $keySegments[count($keySegments) - 1];  | 
                                                        |
| 587 | + $keyName = $keySegments[count($keySegments)-1];  | 
                                                        |
| 588 | 588 | $localRaw = $isBelong ? $foo->$rkMethodName() : $foo->$rkMethodAlternate();  | 
                                                        
| 589 | 589 |              $localSegments = explode('.', $localRaw); | 
                                                        
| 590 | - $localName = $localSegments[count($localSegments) - 1];  | 
                                                        |
| 590 | + $localName = $localSegments[count($localSegments)-1];  | 
                                                        |
| 591 | 591 | $first = $isBelong ? $localName : $keyName;  | 
                                                        
| 592 | 592 | $last = $isBelong ? $keyName : $localName;  | 
                                                        
| 593 | 593 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ);  | 
                                                        
@@ -611,10 +611,10 @@ discard block  | 
                                                    ||
| 611 | 611 | |
| 612 | 612 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->$fkMethodAlternate();  | 
                                                        
| 613 | 613 |              $keySegments = explode('.', $keyRaw); | 
                                                        
| 614 | - $keyName = $keySegments[count($keySegments) - 1];  | 
                                                        |
| 614 | + $keyName = $keySegments[count($keySegments)-1];  | 
                                                        |
| 615 | 615 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->$rkMethodAlternate();  | 
                                                        
| 616 | 616 |              $localSegments = explode('.', $localRaw); | 
                                                        
| 617 | - $localName = $localSegments[count($localSegments) - 1];  | 
                                                        |
| 617 | + $localName = $localSegments[count($localSegments)-1];  | 
                                                        |
| 618 | 618 | $first = $isMany ? $keyName : $localName;  | 
                                                        
| 619 | 619 | $last = $isMany ? $localName : $keyName;  | 
                                                        
| 620 | 620 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ);  | 
                                                        
@@ -637,10 +637,10 @@ discard block  | 
                                                    ||
| 637 | 637 | |
| 638 | 638 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->$fkMethodAlternate();  | 
                                                        
| 639 | 639 |              $keySegments = explode('.', $keyRaw); | 
                                                        
| 640 | - $keyName = $keySegments[count($keySegments) - 1];  | 
                                                        |
| 640 | + $keyName = $keySegments[count($keySegments)-1];  | 
                                                        |
| 641 | 641 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->$rkMethodAlternate();  | 
                                                        
| 642 | 642 |              $localSegments = explode('.', $localRaw); | 
                                                        
| 643 | - $localName = $localSegments[count($localSegments) - 1];  | 
                                                        |
| 643 | + $localName = $localSegments[count($localSegments)-1];  | 
                                                        |
| 644 | 644 | |
| 645 | 645 | $first = $keyName;  | 
                                                        
| 646 | 646 | $last = (isset($localName) && '' != $localName) ? $localName : $foo->getRelated()->getKeyName();  | 
                                                        
@@ -17,7 +17,7 @@ discard block  | 
                                                    ||
| 17 | 17 | |
| 18 | 18 | class MetadataProvider extends MetadataBaseProvider  | 
                                                        
| 19 | 19 |  { | 
                                                        
| 20 | - protected $multConstraints = [ '0..1' => ['1'], '1' => ['0..1', '*'], '*' => ['1', '*']];  | 
                                                        |
| 20 | + protected $multConstraints = ['0..1' => ['1'], '1' => ['0..1', '*'], '*' => ['1', '*']];  | 
                                                        |
| 21 | 21 | protected static $metaNAMESPACE = 'Data';  | 
                                                        
| 22 | 22 | const POLYMORPHIC = 'polyMorphicPlaceholder';  | 
                                                        
| 23 | 23 | const POLYMORPHIC_PLURAL = 'polyMorphicPlaceholders';  | 
                                                        
@@ -208,7 +208,7 @@ discard block  | 
                                                    ||
| 208 | 208 | $knownKeys = array_keys($knownSide);  | 
                                                        
| 209 | 209 | $unknownKeys = array_keys($unknownSide);  | 
                                                        
| 210 | 210 | $dualKeys = array_intersect($knownKeys, $unknownKeys);  | 
                                                        
| 211 | - assert(count($hooks) == (count($unknownKeys) + count($knownKeys) - count($dualKeys)));  | 
                                                        |
| 211 | + assert(count($hooks) == (count($unknownKeys)+count($knownKeys)-count($dualKeys)));  | 
                                                        |
| 212 | 212 | // if either list is empty, bail out - there's nothing to do  | 
                                                        
| 213 | 213 |          if (0 === count($knownSide) || 0 === count($unknownSide)) { | 
                                                        
| 214 | 214 | return [];  | 
                                                        
@@ -140,8 +140,8 @@ discard block  | 
                                                    ||
| 140 | 140 | $nullFilter = true;  | 
                                                        
| 141 | 141 | $isvalid = null;  | 
                                                        
| 142 | 142 |          if (isset($filterInfo)) { | 
                                                        
| 143 | - $method = 'return '.$filterInfo->getExpressionAsString().';';  | 
                                                        |
| 144 | - $clln = '$'.$resourceSet->getResourceType()->getName();  | 
                                                        |
| 143 | + $method = 'return ' . $filterInfo->getExpressionAsString() . ';';  | 
                                                        |
| 144 | + $clln = '$' . $resourceSet->getResourceType()->getName();  | 
                                                        |
| 145 | 145 | $isvalid = create_function($clln, $method);  | 
                                                        
| 146 | 146 | $nullFilter = false;  | 
                                                        
| 147 | 147 | }  | 
                                                        
@@ -169,7 +169,7 @@ discard block  | 
                                                    ||
| 169 | 169 | // so we can't bail out early  | 
                                                        
| 170 | 170 | $rawCount += $results->count();  | 
                                                        
| 171 | 171 | // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz  | 
                                                        
| 172 | -                    if ($rawTop > $resultSet->count() + $skip) { | 
                                                        |
| 172 | +                    if ($rawTop > $resultSet->count()+$skip) { | 
                                                        |
| 173 | 173 | $resultSet = collect(array_merge($resultSet->all(), $results->all()));  | 
                                                        
| 174 | 174 | $sliceAmount = min($skip, $resultSet->count());  | 
                                                        
| 175 | 175 | $resultSet = $resultSet->slice($sliceAmount);  | 
                                                        
@@ -207,7 +207,7 @@ discard block  | 
                                                    ||
| 207 | 207 |          if (QueryType::COUNT() == $queryType || QueryType::ENTITIES_WITH_COUNT() == $queryType) { | 
                                                        
| 208 | 208 | $result->count = $resultCount;  | 
                                                        
| 209 | 209 | }  | 
                                                        
| 210 | - $hazMore = $bulkSetCount > $skip + count($resultSet);  | 
                                                        |
| 210 | + $hazMore = $bulkSetCount > $skip+count($resultSet);  | 
                                                        |
| 211 | 211 | $result->hasMore = $hazMore;  | 
                                                        
| 212 | 212 | return $result;  | 
                                                        
| 213 | 213 | }  | 
                                                        
@@ -367,7 +367,7 @@ discard block  | 
                                                    ||
| 367 | 367 |      ) { | 
                                                        
| 368 | 368 | $propertyName = $targetProperty->getName();  | 
                                                        
| 369 | 369 |          if (!method_exists($sourceEntityInstance, $propertyName)) { | 
                                                        
| 370 | - $msg = 'Relation method, '.$propertyName.', does not exist on supplied entity.';  | 
                                                        |
| 370 | + $msg = 'Relation method, ' . $propertyName . ', does not exist on supplied entity.';  | 
                                                        |
| 371 | 371 | throw new InvalidArgumentException($msg);  | 
                                                        
| 372 | 372 | }  | 
                                                        
| 373 | 373 | // take key descriptor and turn it into where clause here, rather than in getResource call  |