| @@ -50,7 +50,7 @@ | ||
| 50 | 50 | * | 
| 51 | 51 | * @return bool true if the segment was push, false otherwise | 
| 52 | 52 | */ | 
| 53 | - public function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) | |
| 53 | + public function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) | |
| 54 | 54 |      { | 
| 55 | 55 |          if (!is_string($segmentName)) { | 
| 56 | 56 |              throw new InvalidOperationException('segmentName must be a string'); | 
| @@ -158,8 +158,8 @@ | ||
| 158 | 158 | |
| 159 | 159 | case 'Edm.DateTime': | 
| 160 | 160 |                  $dateTime = new Carbon($value, new \DateTimeZone('UTC')); | 
| 161 | -                $formattedDateTime = $dateTime->format('U') * 1000; | |
| 162 | -                $this->_writeCore('/Date('.$formattedDateTime.')/', /* quotes */ true); | |
| 161 | +                $formattedDateTime = $dateTime->format('U')*1000; | |
| 162 | +                $this->_writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true); | |
| 163 | 163 | break; | 
| 164 | 164 | |
| 165 | 165 | case 'Edm.String': | 
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | */ | 
| 14 | 14 | public static function resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty($argumentName) | 
| 15 | 15 |      { | 
| 16 | - return "The argument '".$argumentName."' must be either null or instance of 'ResourceProperty'."; | |
| 16 | + return "The argument '" . $argumentName . "' must be either null or instance of 'ResourceProperty'."; | |
| 17 | 17 | } | 
| 18 | 18 | |
| 19 | 19 | /** | 
| @@ -102,7 +102,7 @@ | ||
| 102 | 102 | |
| 103 | 103 | $a = $this->_isAscending ? 1 : -1; | 
| 104 | 104 | |
| 105 | -        $retVal = function ($object1, $object2) use ($ancestors, $a) { | |
| 105 | +        $retVal = function($object1, $object2) use ($ancestors, $a) { | |
| 106 | 106 | $accessor1 = $object1; | 
| 107 | 107 | $accessor2 = $object2; | 
| 108 | 108 | $flag1 = is_null($accessor1); | 
| @@ -132,7 +132,7 @@ | ||
| 132 | 132 | } | 
| 133 | 133 | |
| 134 | 134 | $this->rawUrl .= '://' . | 
| 135 | - $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; | |
| 135 | + $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; | |
| 136 | 136 | $this->rawUrl .= utf8_decode(urldecode($_SERVER[ODataConstants::HTTPREQUEST_URI])); | 
| 137 | 137 | } | 
| 138 | 138 | |
| @@ -410,7 +410,7 @@ | ||
| 410 | 410 | $this->topLevelComparisonFunction = $this->comparisonFunctions[0]; | 
| 411 | 411 |          } else { | 
| 412 | 412 | $funcList = $this->comparisonFunctions; | 
| 413 | -            $this->topLevelComparisonFunction = function ($object1, $object2) use ($funcList) { | |
| 413 | +            $this->topLevelComparisonFunction = function($object1, $object2) use ($funcList) { | |
| 414 | 414 | $ret = 0; | 
| 415 | 415 |                  foreach ($funcList as $f) { | 
| 416 | 416 | $ret = $f($object1, $object2); | 
| @@ -123,7 +123,7 @@ discard block | ||
| 123 | 123 | $expectedParms = count($baseParms); | 
| 124 | 124 | $actualParms = count($parms); | 
| 125 | 125 |          if ($expectedParms != $actualParms) { | 
| 126 | - $msg = "Was expecting ". $expectedParms. " arguments, received ".$actualParms." instead"; | |
| 126 | + $msg = "Was expecting " . $expectedParms . " arguments, received " . $actualParms . " instead"; | |
| 127 | 127 | throw new \InvalidArgumentException($msg); | 
| 128 | 128 | } | 
| 129 | 129 | |
| @@ -137,7 +137,7 @@ discard block | ||
| 137 | 137 | private function checkBlacklist($func, $fromArray = false) | 
| 138 | 138 |      { | 
| 139 | 139 |          if (in_array($func, $this->blacklist) || in_array(strtolower($func), $this->blacklist)) { | 
| 140 | - $msg = (true === $fromArray ? "First element of " : "")."FunctionName blacklisted"; | |
| 140 | + $msg = (true === $fromArray ? "First element of " : "") . "FunctionName blacklisted"; | |
| 141 | 141 | throw new \InvalidArgumentException($msg); | 
| 142 | 142 | } | 
| 143 | 143 | } | 
| @@ -295,7 +295,7 @@ discard block | ||
| 295 | 295 | $type = null; | 
| 296 | 296 |          if ($typeKind == ResourceTypeKind::ENTITY) { | 
| 297 | 297 | list($oet, $entitySet) = $this->metadataManager->addEntityType($name); | 
| 298 | - assert($oet instanceof TEntityTypeType, "Entity type ".$name. " not successfully added"); | |
| 298 | + assert($oet instanceof TEntityTypeType, "Entity type " . $name . " not successfully added"); | |
| 299 | 299 | $type = new ResourceEntityType($refClass, $oet, $this); | 
| 300 | 300 | $typeName = $type->getFullName(); | 
| 301 | 301 | $returnName = Str::plural($typeName); | 
| @@ -584,7 +584,7 @@ discard block | ||
| 584 | 584 | ); | 
| 585 | 585 | } | 
| 586 | 586 |          if (!in_array($resourceMult, $allowedMult)) { | 
| 587 | -            throw new InvalidOperationException("Supplied multiplicity ".$resourceMult." not valid"); | |
| 587 | +            throw new InvalidOperationException("Supplied multiplicity " . $resourceMult . " not valid"); | |
| 588 | 588 | } | 
| 589 | 589 | |
| 590 | 590 |          $resourcePropertyKind = ('*' == $resourceMult) | 
| @@ -852,12 +852,12 @@ discard block | ||
| 852 | 852 | throw new \InvalidArgumentException($msg); | 
| 853 | 853 | } | 
| 854 | 854 |          if (array_key_exists($name, $this->resourceSets)) { | 
| 855 | - $msg = "Resource set with same name, ". $name. ", exists"; | |
| 855 | + $msg = "Resource set with same name, " . $name . ", exists"; | |
| 856 | 856 | throw new \InvalidArgumentException($msg); | 
| 857 | 857 | } | 
| 858 | 858 | $typeName = $returnType->getName(); | 
| 859 | 859 |          if (!array_key_exists($typeName, $this->OdataEntityMap)) { | 
| 860 | - $msg = "Mapping not defined for ".$typeName; | |
| 860 | + $msg = "Mapping not defined for " . $typeName; | |
| 861 | 861 | throw new \InvalidArgumentException($msg); | 
| 862 | 862 | } | 
| 863 | 863 | $metaReturn = $this->OdataEntityMap[$typeName]; | 
| @@ -222,7 +222,7 @@ discard block | ||
| 222 | 222 | */ | 
| 223 | 223 | protected function executePut() | 
| 224 | 224 |      { | 
| 225 | -        return $this->executeBase(function ($uriProcessor, $segment) { | |
| 225 | +        return $this->executeBase(function($uriProcessor, $segment) { | |
| 226 | 226 | $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod(); | 
| 227 | 227 | $resourceSet = $segment->getTargetResourceSetWrapper(); | 
| 228 | 228 | $keyDescriptor = $segment->getKeyDescriptor(); | 
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 | */ | 
| 256 | 256 | protected function executeDelete() | 
| 257 | 257 |      { | 
| 258 | -        return $this->executeBase(function ($uriProcessor, $segment) { | |
| 258 | +        return $this->executeBase(function($uriProcessor, $segment) { | |
| 259 | 259 | $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod(); | 
| 260 | 260 | $resourceSet = $segment->getTargetResourceSetWrapper(); | 
| 261 | 261 | $keyDescriptor = $segment->getKeyDescriptor(); | 
| @@ -424,7 +424,7 @@ discard block | ||
| 424 | 424 | //TODO: why are these null? see #98 | 
| 425 | 425 | null, // $orderby | 
| 426 | 426 | null, // $top | 
| 427 | - null, // $skip | |
| 427 | + null, // $skip | |
| 428 | 428 | $skipToken | 
| 429 | 429 | ); | 
| 430 | 430 | |