@@ -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 | $this->getStack()->pushSegment($segmentName, $resourceSetWrapper); |
| 285 | 285 | } |
@@ -2,15 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace POData\UriProcessor; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Str; |
|
| 6 | 5 | use POData\Providers\ProvidersWrapper; |
| 7 | 6 | use POData\Providers\Metadata\ResourcePropertyKind; |
| 8 | -use POData\Providers\Metadata\ResourceTypeKind; |
|
| 9 | -use POData\Providers\Metadata\ResourceSetWrapper; |
|
| 10 | -use POData\Providers\Metadata\ResourceProperty; |
|
| 11 | 7 | use POData\Providers\Query\QueryType; |
| 12 | 8 | use POData\UriProcessor\QueryProcessor\QueryProcessor; |
| 13 | -use POData\UriProcessor\QueryProcessor\ExpandProjectionParser\ExpandedProjectionNode; |
|
| 14 | 9 | use POData\UriProcessor\ResourcePathProcessor\ResourcePathProcessor; |
| 15 | 10 | use POData\UriProcessor\ResourcePathProcessor\SegmentParser\SegmentDescriptor; |
| 16 | 11 | use POData\UriProcessor\ResourcePathProcessor\SegmentParser\TargetKind; |
@@ -18,7 +13,6 @@ discard block |
||
| 18 | 13 | use POData\IService; |
| 19 | 14 | use POData\Common\Messages; |
| 20 | 15 | use POData\Common\ODataException; |
| 21 | -use POData\Common\InvalidOperationException; |
|
| 22 | 16 | use POData\Common\ODataConstants; |
| 23 | 17 | use POData\Providers\Query\QueryResult; |
| 24 | 18 | use POData\OperationContext\HTTPRequestMethod; |
@@ -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 | |
@@ -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, |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | * contain converted value |
| 824 | 824 | */ |
| 825 | 825 | private function _primitiveToString( |
| 826 | - ResourceType &$primitiveResourceType, |
|
| 826 | + ResourceType & $primitiveResourceType, |
|
| 827 | 827 | $primitiveValue, |
| 828 | 828 | &$stringValue |
| 829 | 829 | ) { |