@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | protected function executePut() |
| 210 | 210 | { |
| 211 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 211 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 212 | 212 | $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod(); |
| 213 | 213 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 214 | 214 | $keyDescriptor = $segment->getKeyDescriptor(); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | protected function executeDelete() |
| 233 | 233 | { |
| 234 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 234 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 235 | 235 | $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod(); |
| 236 | 236 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 237 | 237 | $keyDescriptor = $segment->getKeyDescriptor(); |
@@ -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 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return ODataPropertyContent |
| 64 | 64 | */ |
| 65 | - public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType &$resourceType); |
|
| 65 | + public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType & $resourceType); |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * Write top level bag resource. |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @return ODataPropertyContent |
| 78 | 78 | */ |
| 79 | - public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType &$resourceType); |
|
| 79 | + public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType & $resourceType); |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * Write top level primitive value. |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return ODataPropertyContent |
| 92 | 92 | */ |
| 93 | - public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty &$resourceProperty); |
|
| 93 | + public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty & $resourceProperty); |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * Gets reference to the request submitted by client. |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | */ |
| 666 | 666 | protected function compareETag( |
| 667 | 667 | &$entryObject, |
| 668 | - ResourceType &$resourceType, |
|
| 668 | + ResourceType & $resourceType, |
|
| 669 | 669 | &$needToSerializeResponse |
| 670 | 670 | ) { |
| 671 | 671 | $needToSerializeResponse = true; |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | // but that is causing an issue in Linux env where the |
| 717 | 717 | // firefix browser is unable to parse the ETag in this case. |
| 718 | 718 | // Need to follow up PHP core devs for this. |
| 719 | - $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX.$eTag.'"'; |
|
| 719 | + $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX . $eTag . '"'; |
|
| 720 | 720 | if (!is_null($ifMatch)) { |
| 721 | 721 | if (0 != strcmp($eTag, $ifMatch)) { |
| 722 | 722 | // Requested If-Match value does not match with current |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | // but that is causing an issue in Linux env where the |
| 740 | 740 | // firefix browser is unable to parse the ETag in this case. |
| 741 | 741 | // Need to follow up PHP core devs for this. |
| 742 | - $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX.$eTag.'"'; |
|
| 742 | + $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX . $eTag . '"'; |
|
| 743 | 743 | } |
| 744 | 744 | |
| 745 | 745 | return $eTag; |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | * for use in a URI) there are etag properties, NULL if |
| 759 | 759 | * there is no etag property |
| 760 | 760 | */ |
| 761 | - protected function getETagForEntry(&$entryObject, ResourceType &$resourceType) |
|
| 761 | + protected function getETagForEntry(&$entryObject, ResourceType & $resourceType) |
|
| 762 | 762 | { |
| 763 | 763 | $eTag = null; |
| 764 | 764 | $comma = null; |
@@ -777,8 +777,8 @@ discard block |
||
| 777 | 777 | ); |
| 778 | 778 | } |
| 779 | 779 | |
| 780 | - $eTagBase = $eTag.$comma; |
|
| 781 | - $eTag = $eTagBase.((null == $value) ? 'null' : $type->convertToOData($value)); |
|
| 780 | + $eTagBase = $eTag . $comma; |
|
| 781 | + $eTag = $eTagBase . ((null == $value) ? 'null' : $type->convertToOData($value)); |
|
| 782 | 782 | |
| 783 | 783 | $comma = ','; |
| 784 | 784 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | * |
| 195 | 195 | * @return bool true if a segment was pushed, false otherwise |
| 196 | 196 | */ |
| 197 | - private function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
| 197 | + private function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
| 198 | 198 | { |
| 199 | 199 | if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) { |
| 200 | 200 | assert(!empty($this->getStack()->getSegmentNames()), '!is_empty($this->getStack()->getSegmentNames())'); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * |
| 280 | 280 | * @return bool true if the segment was push, false otherwise |
| 281 | 281 | */ |
| 282 | - private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 282 | + private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 283 | 283 | { |
| 284 | 284 | return $this->getStack()->pushSegment($segmentName, $resourceSetWrapper); |
| 285 | 285 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | throw new \Exception(); |
| 36 | 36 | } |
| 37 | 37 | } catch (\Exception $ex) { |
| 38 | - throw new \Exception('[XML2Array] Error parsing the XML string.'.PHP_EOL.$ex->getMessage()); |
|
| 38 | + throw new \Exception('[XML2Array] Error parsing the XML string.' . PHP_EOL . $ex->getMessage()); |
|
| 39 | 39 | } |
| 40 | 40 | } elseif (is_object($input_xml)) { |
| 41 | 41 | if (get_class($input_xml) != 'DOMDocument') { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | if ($hasPredicate) { |
| 316 | 316 | $this->_assertion(!$current->isSingleResult()); |
| 317 | 317 | $keyDescriptor = $this->_createKeyDescriptor( |
| 318 | - $identifier.'('.$keyPredicate.')', |
|
| 318 | + $identifier . '(' . $keyPredicate . ')', |
|
| 319 | 319 | $projectedProperty->getResourceType(), |
| 320 | 320 | $keyPredicate |
| 321 | 321 | ); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | $descriptor->setTargetKind(TargetKind::RESOURCE()); |
| 395 | 395 | if ($keyPredicate !== null) { |
| 396 | 396 | $keyDescriptor = $this->_createKeyDescriptor( |
| 397 | - $segmentIdentifier.'('.$keyPredicate.')', |
|
| 397 | + $segmentIdentifier . '(' . $keyPredicate . ')', |
|
| 398 | 398 | $resourceSetWrapper->getResourceType(), |
| 399 | 399 | $keyPredicate |
| 400 | 400 | ); |