@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $resourceTypesInContainerNamespace = array(); |
| 99 | 99 | $containerNamespace = $this->providersWrapper->getContainerNamespace(); |
| 100 | 100 | foreach ($this->_metadataManager->getResourceTypesAlongWithNamespace() |
| 101 | - as $resourceTypeNamespace => $resourceTypesWithName) { |
|
| 101 | + as $resourceTypeNamespace => $resourceTypesWithName) { |
|
| 102 | 102 | if ($resourceTypeNamespace == $containerNamespace) { |
| 103 | 103 | foreach ($resourceTypesWithName as $resourceTypeName => $resourceType) { |
| 104 | 104 | $resourceTypesInContainerNamespace[] = $resourceType; |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | private function _writeProperties(ResourceType $resourceType, $associationTypesInResourceTypeNamespace) |
| 280 | 280 | { |
| 281 | 281 | foreach ($this->_metadataManager->getAllVisiblePropertiesDeclaredOnThisType($resourceType) |
| 282 | - as $resourceProperty) { |
|
| 282 | + as $resourceProperty) { |
|
| 283 | 283 | if ($resourceProperty->isKindOf(ResourcePropertyKind::BAG)) { |
| 284 | 284 | $this->_writeBagProperty($resourceProperty); |
| 285 | 285 | } elseif ($resourceProperty->isKindOf(ResourcePropertyKind::PRIMITIVE)) { |
@@ -382,7 +382,7 @@ |
||
| 382 | 382 | $segment->setResult($entityInstance); |
| 383 | 383 | } else { |
| 384 | 384 | $skip = (null == $this->getRequest()) ? 0 : $this->getRequest()->getSkipCount(); |
| 385 | - $skip = (null == $skip) ? 0 :$skip; |
|
| 385 | + $skip = (null == $skip) ? 0 : $skip; |
|
| 386 | 386 | $queryResult = $this->getProviders()->getResourceSet( |
| 387 | 387 | $this->getRequest()->queryType, |
| 388 | 388 | $segment->getTargetResourceSetWrapper(), |
@@ -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': |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | public static function validateWithoutPrefix($value, &$outValue) |
| 120 | 120 | { |
| 121 | 121 | $length = strlen($value); |
| 122 | - if (0 == $length || 0 != $length % 2) { |
|
| 122 | + if (0 == $length || 0 != $length%2) { |
|
| 123 | 123 | return false; |
| 124 | 124 | } |
| 125 | 125 | |
@@ -695,7 +695,6 @@ |
||
| 695 | 695 | * whose value need to be converted |
| 696 | 696 | * @param mixed $primitiveValue Primitive value to convert |
| 697 | 697 | * @return string |
| 698 | - |
|
| 699 | 698 | */ |
| 700 | 699 | private function _primitiveToString( |
| 701 | 700 | ResourceType &$primitiveResourceType, |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | public function writeTopLevelComplexObject( |
| 187 | 187 | &$complexValue, |
| 188 | 188 | $propertyName, |
| 189 | - ResourceType &$resourceType |
|
| 189 | + ResourceType & $resourceType |
|
| 190 | 190 | ) { |
| 191 | 191 | $propertyContent = new ODataPropertyContent(); |
| 192 | 192 | $this->_writeComplexValue( |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | private function _writeFeedElements( |
| 332 | 332 | &$entryObjects, |
| 333 | - ResourceType &$resourceType, |
|
| 333 | + ResourceType & $resourceType, |
|
| 334 | 334 | $title, |
| 335 | 335 | $absoluteUri, |
| 336 | 336 | $relativeUri, |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | |
| 699 | 699 | */ |
| 700 | 700 | private function _primitiveToString( |
| 701 | - ResourceType &$primitiveResourceType, |
|
| 701 | + ResourceType & $primitiveResourceType, |
|
| 702 | 702 | $primitiveValue |
| 703 | 703 | ) { |
| 704 | 704 | $type = $primitiveResourceType->getInstanceType(); |
@@ -779,9 +779,9 @@ discard block |
||
| 779 | 779 | */ |
| 780 | 780 | private function writeObjectPropertiesUnexpanded( |
| 781 | 781 | $customObject, |
| 782 | - ResourceType &$resourceType, |
|
| 782 | + ResourceType & $resourceType, |
|
| 783 | 783 | $relativeUri, |
| 784 | - ODataPropertyContent &$odataPropertyContent, |
|
| 784 | + ODataPropertyContent & $odataPropertyContent, |
|
| 785 | 785 | $resourceTypeKind, |
| 786 | 786 | $navigationProperties |
| 787 | 787 | ) { |
@@ -888,9 +888,9 @@ discard block |
||
| 888 | 888 | */ |
| 889 | 889 | private function writeObjectPropertiesExpanded( |
| 890 | 890 | $customObject, |
| 891 | - ResourceType &$resourceType, |
|
| 891 | + ResourceType & $resourceType, |
|
| 892 | 892 | $relativeUri, |
| 893 | - ODataPropertyContent &$odataPropertyContent, |
|
| 893 | + ODataPropertyContent & $odataPropertyContent, |
|
| 894 | 894 | $projectionNodes, |
| 895 | 895 | $navigationProperties |
| 896 | 896 | ) { |
@@ -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. |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | * @throws InvalidOperationException If this function invoked with non-navigation |
| 195 | 195 | * property instance |
| 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 | } |