Completed
Pull Request — master (#63)
by Christopher
16:31
created
src/POData/ObjectModel/NavigationPropertyInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * @param bool             $expanded          Whether the navigation is expanded
22 22
      *                                            or not
23 23
      */
24
-    public function __construct(ResourceProperty &$resourceProperty, $expanded)
24
+    public function __construct(ResourceProperty & $resourceProperty, $expanded)
25 25
     {
26 26
         $this->resourceProperty = $resourceProperty;
27 27
         $this->expanded = $expanded;
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 $this->getCurrentResourceSetWrapper()->getName()
133 133
             );
134 134
 
135
-            $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
135
+            $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
136 136
         }
137 137
 
138 138
         return $url;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
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(
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public function writeTopLevelBagObject(
216 216
         &$BagValue,
217 217
         $propertyName,
218
-        ResourceType &$resourceType
218
+        ResourceType & $resourceType
219 219
     ) {
220 220
         $propertyContent = new ODataPropertyContent();
221 221
         $this->_writeBagValue(
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     public function writeTopLevelPrimitive(
245 245
         &$primitiveValue,
246
-        ResourceProperty &$resourceProperty
246
+        ResourceProperty & $resourceProperty
247 247
     ) {
248 248
         $propertyContent = new ODataPropertyContent();
249 249
         $propertyContent->properties[] = new ODataProperty();
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 $this->getCurrentResourceSetWrapper()->getName()
286 286
             );
287 287
 
288
-            $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
288
+            $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
289 289
             $title = $resourceType->getName();
290 290
             //TODO Resolve actual resource type
291 291
             $actualResourceType = $resourceType;
@@ -330,11 +330,11 @@  discard block
 block discarded – undo
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,
337
-        ODataFeed &$feed
337
+        ODataFeed & $feed
338 338
     ) {
339 339
         assert(is_array($entryObjects), '!_writeFeedElements::is_array($entryObjects)');
340 340
         $feed->id = $absoluteUri;
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
      */
385 385
     private function _writeObjectProperties(
386 386
         $customObject,
387
-        ResourceType &$resourceType,
387
+        ResourceType & $resourceType,
388 388
         $absoluteUri,
389 389
         $relativeUri,
390 390
         &$odataEntry,
391
-        ODataPropertyContent &$odataPropertyContent
391
+        ODataPropertyContent & $odataPropertyContent
392 392
     ) {
393 393
         $resourceTypeKind = $resourceType->getResourceTypeKind();
394 394
         if (is_null($absoluteUri) == ($resourceTypeKind == ResourceTypeKind::ENTITY)
@@ -440,14 +440,14 @@  discard block
 block discarded – undo
440 440
                 $type = $navigationPropertyInfo->resourceProperty->getKind() == ResourcePropertyKind::RESOURCE_REFERENCE ?
441 441
                     'application/atom+xml;type=entry' : 'application/atom+xml;type=feed';
442 442
                 $link = new ODataLink();
443
-                $link->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propertyName;
443
+                $link->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propertyName;
444 444
                 $link->title = $propertyName;
445 445
                 $link->type = $type;
446
-                $link->url = $relativeUri.'/'.$propertyName;
446
+                $link->url = $relativeUri . '/' . $propertyName;
447 447
 
448 448
                 if ($navigationPropertyInfo->expanded) {
449
-                    $propertyRelativeUri = $relativeUri.'/'.$propertyName;
450
-                    $propertyAbsoluteUri = trim($absoluteUri, '/').'/'.$propertyName;
449
+                    $propertyRelativeUri = $relativeUri . '/' . $propertyName;
450
+                    $propertyAbsoluteUri = trim($absoluteUri, '/') . '/' . $propertyName;
451 451
                     $needPop = $this->pushSegmentForNavigationProperty($navigationPropertyInfo->resourceProperty);
452 452
                     $navigationPropertyKind = $navigationPropertyInfo->resourceProperty->getKind();
453 453
                     assert(
@@ -510,8 +510,8 @@  discard block
 block discarded – undo
510 510
      */
511 511
     private function _writePrimitiveValue(
512 512
         &$primitiveValue,
513
-        ResourceProperty &$resourceProperty,
514
-        ODataProperty &$odataProperty
513
+        ResourceProperty & $resourceProperty,
514
+        ODataProperty & $odataProperty
515 515
     ) {
516 516
         if (is_object($primitiveValue)) {
517 517
             //TODO ERROR: The property 'PropertyName'
@@ -545,9 +545,9 @@  discard block
 block discarded – undo
545 545
     private function _writeComplexValue(
546 546
         &$complexValue,
547 547
         $propertyName,
548
-        ResourceType &$resourceType,
548
+        ResourceType & $resourceType,
549 549
         $relativeUri,
550
-        ODataPropertyContent &$odataPropertyContent
550
+        ODataPropertyContent & $odataPropertyContent
551 551
     ) {
552 552
         $odataProperty = new ODataProperty();
553 553
         $odataProperty->name = $propertyName;
@@ -586,9 +586,9 @@  discard block
 block discarded – undo
586 586
     private function _writeBagValue(
587 587
         &$BagValue,
588 588
         $propertyName,
589
-        ResourceType &$resourceType,
589
+        ResourceType & $resourceType,
590 590
         $relativeUri,
591
-        ODataPropertyContent &$odataPropertyContent
591
+        ODataPropertyContent & $odataPropertyContent
592 592
     ) {
593 593
         assert(null == $BagValue || is_array($BagValue), 'Bag parameter must be null or array');
594 594
         $bagItemResourceTypeKind = $resourceType->getResourceTypeKind();
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 
602 602
         $odataProperty = new ODataProperty();
603 603
         $odataProperty->name = $propertyName;
604
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
604
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
605 605
 
606 606
         if (is_null($BagValue) || (is_array($BagValue) && empty($BagValue))) {
607 607
             $odataProperty->value = null;
@@ -645,10 +645,10 @@  discard block
 block discarded – undo
645 645
      */
646 646
     private function _writeMediaResourceMetadata(
647 647
         $entryObject,
648
-        ResourceType &$resourceType,
648
+        ResourceType & $resourceType,
649 649
         $title,
650 650
         $relativeUri,
651
-        ODataEntry &$odataEntry
651
+        ODataEntry & $odataEntry
652 652
     ) {
653 653
         if ($resourceType->isMediaLinkEntry()) {
654 654
             $odataEntry->isMediaLinkEntry = true;
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
      * @return string
697 697
      */
698 698
     private function _primitiveToString(
699
-        ResourceType &$primitiveResourceType,
699
+        ResourceType & $primitiveResourceType,
700 700
         $primitiveValue
701 701
     ) {
702 702
         $type = $primitiveResourceType->getInstanceType();
@@ -735,9 +735,9 @@  discard block
 block discarded – undo
735 735
     private function _complexObjectToContent(
736 736
         &$complexValue,
737 737
         $propertyName,
738
-        ResourceType &$resourceType,
738
+        ResourceType & $resourceType,
739 739
         $relativeUri,
740
-        ODataPropertyContent &$odataPropertyContent
740
+        ODataPropertyContent & $odataPropertyContent
741 741
     ) {
742 742
         $count = count($this->complexTypeInstanceCollection);
743 743
         for ($i = 0; $i < $count; ++$i) {
@@ -780,9 +780,9 @@  discard block
 block discarded – undo
780 780
      */
781 781
     private function writeObjectPropertiesUnexpanded(
782 782
         $customObject,
783
-        ResourceType &$resourceType,
783
+        ResourceType & $resourceType,
784 784
         $relativeUri,
785
-        ODataPropertyContent &$odataPropertyContent,
785
+        ODataPropertyContent & $odataPropertyContent,
786 786
         $resourceTypeKind,
787 787
         $navigationProperties
788 788
     ) {
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
                     $propertyValue,
833 833
                     $resourceProperty->getName(),
834 834
                     $resourceType2,
835
-                    $relativeUri.'/'.$resourceProperty->getName(),
835
+                    $relativeUri . '/' . $resourceProperty->getName(),
836 836
                     $odataPropertyContent
837 837
                 );
838 838
             } else {
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
                         $propertyValue,
845 845
                         $resourceProperty->getName(),
846 846
                         $resourceType1,
847
-                        $relativeUri.'/'.$resourceProperty->getName(),
847
+                        $relativeUri . '/' . $resourceProperty->getName(),
848 848
                         $odataPropertyContent
849 849
                     );
850 850
                 } elseif ($resourceKind == ResourcePropertyKind::PRIMITIVE
@@ -892,9 +892,9 @@  discard block
 block discarded – undo
892 892
      */
893 893
     private function writeObjectPropertiesExpanded(
894 894
         $customObject,
895
-        ResourceType &$resourceType,
895
+        ResourceType & $resourceType,
896 896
         $relativeUri,
897
-        ODataPropertyContent &$odataPropertyContent,
897
+        ODataPropertyContent & $odataPropertyContent,
898 898
         $projectionNodes,
899 899
         $navigationProperties
900 900
     ) {
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
                     $propertyValue,
943 943
                     $propertyName,
944 944
                     $bagResourceType,
945
-                    $relativeUri.'/'.$propertyName,
945
+                    $relativeUri . '/' . $propertyName,
946 946
                     $odataPropertyContent
947 947
                 );
948 948
             } elseif ($resourceProperty->isKindOf(ResourcePropertyKind::PRIMITIVE)) {
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
                     $propertyValue,
956 956
                     $propertyName,
957 957
                     $complexResourceType,
958
-                    $relativeUri.'/'.$propertyName,
958
+                    $relativeUri . '/' . $propertyName,
959 959
                     $odataPropertyContent
960 960
                 );
961 961
             } else {
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializerBase.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $this->service = $service;
74 74
         $this->request = $request;
75 75
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
76
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
76
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
77 77
         $this->stack = new SegmentStack($request);
78 78
         $this->complexTypeInstanceCollection = [];
79 79
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $keyProperties = $resourceType->getKeyProperties();
142 142
         assert(count($keyProperties) != 0, 'count($keyProperties) == 0');
143
-        $keyString = $containerName.'(';
143
+        $keyString = $containerName . '(';
144 144
         $comma = null;
145 145
         foreach ($keyProperties as $keyName => $resourceProperty) {
146 146
             $keyType = $resourceProperty->getInstanceType();
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             }
154 154
 
155 155
             $keyValue = $keyType->convertToOData($keyValue);
156
-            $keyString .= $comma.$keyName.'='.$keyValue;
156
+            $keyString .= $comma . $keyName . '=' . $keyValue;
157 157
             $comma = ',';
158 158
         }
159 159
 
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
             assert(!is_null($type) && $type instanceof IType, 'is_null($type) || $type not instanceof IType');
234 234
             $value = $this->getPropertyValue($entryObject, $resourceType, $eTagProperty);
235 235
             if (is_null($value)) {
236
-                $eTag = $eTag.$comma.'null';
236
+                $eTag = $eTag . $comma . 'null';
237 237
             } else {
238
-                $eTag = $eTag.$comma.$type->convertToOData($value);
238
+                $eTag = $eTag . $comma . $type->convertToOData($value);
239 239
             }
240 240
 
241 241
             $comma = ',';
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             // want this for eTag value.
248 248
             $eTag = urldecode(utf8_decode($eTag));
249 249
 
250
-            return ODataConstants::HTTP_WEAK_ETAG_PREFIX.rtrim($eTag, ',').'"';
250
+            return ODataConstants::HTTP_WEAK_ETAG_PREFIX . rtrim($eTag, ',') . '"';
251 251
         }
252 252
     }
253 253
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      *
283 283
      * @return bool true if a segment was pushed, false otherwise
284 284
      */
285
-    protected function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty)
285
+    protected function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty)
286 286
     {
287 287
         if (ResourceTypeKind::ENTITY == $resourceProperty->getTypeKind()) {
288 288
             assert(!empty($this->getStack()->getSegmentNames()), 'Segment names should not be empty');
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      *
394 394
      * @return bool true if the segment was push, false otherwise
395 395
      */
396
-    private function _pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
396
+    private function _pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper)
397 397
     {
398 398
         // Even though there is no expand in the request URI, still we need to push
399 399
         // the segment information if we need to count
@@ -429,10 +429,10 @@  discard block
 block discarded – undo
429 429
             $queryParameterString = $this->getNextPageLinkQueryParametersForExpandedResourceSet();
430 430
         }
431 431
 
432
-        $queryParameterString .= '$skip='.$skipToken;
432
+        $queryParameterString .= '$skip=' . $skipToken;
433 433
         $odataLink = new ODataLink();
434 434
         $odataLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
435
-        $odataLink->url = rtrim($absoluteUri, '/').'?'.$queryParameterString;
435
+        $odataLink->url = rtrim($absoluteUri, '/') . '?' . $queryParameterString;
436 436
 
437 437
         return $odataLink;
438 438
     }
@@ -457,10 +457,10 @@  discard block
 block discarded – undo
457 457
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
458 458
             if (!is_null($value)) {
459 459
                 if (!is_null($queryParameterString)) {
460
-                    $queryParameterString = $queryParameterString.'&';
460
+                    $queryParameterString = $queryParameterString . '&';
461 461
                 }
462 462
 
463
-                $queryParameterString .= $queryOption.'='.$value;
463
+                $queryParameterString .= $queryOption . '=' . $value;
464 464
             }
465 465
         }
466 466
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                 $queryParameterString .= '&';
472 472
             }
473 473
 
474
-            $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount;
474
+            $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount;
475 475
         }
476 476
 
477 477
         if (!is_null($queryParameterString)) {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
             }
515 515
 
516 516
             if (!is_null($selectionPaths)) {
517
-                $queryParameterString = '$select='.$selectionPaths;
517
+                $queryParameterString = '$select=' . $selectionPaths;
518 518
             }
519 519
 
520 520
             if (!is_null($expansionPaths)) {
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
                     $queryParameterString .= '&';
523 523
                 }
524 524
 
525
-                $queryParameterString = '$expand='.$expansionPaths;
525
+                $queryParameterString = '$expand=' . $expansionPaths;
526 526
             }
527 527
 
528 528
             if (!is_null($queryParameterString)) {
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
         &$parentPathSegments,
625 625
         &$selectionPaths,
626 626
         &$expansionPaths,
627
-        ExpandedProjectionNode &$expandedProjectionNode,
627
+        ExpandedProjectionNode & $expandedProjectionNode,
628 628
         &$foundSelections,
629 629
         &$foundExpansions
630 630
     ) {
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
                         $this->_appendSelectionOrExpandPath(
659 659
                             $selectionPaths,
660 660
                             $parentPathSegments,
661
-                            $childNode->getPropertyName().'/*'
661
+                            $childNode->getPropertyName() . '/*'
662 662
                         );
663 663
                     } else {
664 664
                         $expandedChildrenNeededToBeSelected[] = $childNode;
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
         }
703 703
 
704 704
         foreach ($parentPathSegments as $parentPathSegment) {
705
-            $path .= $parentPathSegment.'/';
705
+            $path .= $parentPathSegment . '/';
706 706
         }
707 707
 
708 708
         $path .= $segmentToAppend;
Please login to merge, or discard this patch.
src/POData/Writers/Json/JsonLightODataWriter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $this->writeFeed($model);
99 99
             $this->_writer->endScope();
100 100
         } elseif ($model instanceof ODataEntry) {
101
-            $this->writeTopLevelMeta($model->resourceSetName.'/@Element');
101
+            $this->writeTopLevelMeta($model->resourceSetName . '/@Element');
102 102
             $this->writeEntry($model);
103 103
         }
104 104
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         $this->_writer
147 147
             ->writeName(ODataConstants::JSON_LIGHT_METADATA_STRING)
148
-            ->writeValue($this->baseUri.'/'.ODataConstants::URI_METADATA_SEGMENT.'#'.$fragment);
148
+            ->writeValue($this->baseUri . '/' . ODataConstants::URI_METADATA_SEGMENT . '#' . $fragment);
149 149
     }
150 150
 
151 151
     protected function writePropertyMeta(ODataProperty $property)
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             case 'Edm.Decimal':
168 168
             case 'Edm.DateTime':
169 169
                 $this->_writer
170
-                    ->writeName($property->name.ODataConstants::JSON_LIGHT_METADATA_PROPERTY_TYPE_SUFFIX_STRING)
170
+                    ->writeName($property->name . ODataConstants::JSON_LIGHT_METADATA_PROPERTY_TYPE_SUFFIX_STRING)
171 171
                     ->writeValue($property->typeName);
172 172
         }
173 173
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         if ($this->metadataLevel == JsonLightMetadataLevel::FULL()) {
210 210
             //Interestingly the fullmetadata outputs this metadata..even if the thing is expanded
211 211
             $this->_writer
212
-                ->writeName($link->title.ODataConstants::JSON_LIGHT_METADATA_LINK_NAVIGATION_SUFFIX_STRING)
212
+                ->writeName($link->title . ODataConstants::JSON_LIGHT_METADATA_LINK_NAVIGATION_SUFFIX_STRING)
213 213
                 ->writeValue($link->url);
214 214
         }
215 215
 
Please login to merge, or discard this patch.
src/POData/Writers/Metadata/MetadataAssociationTypeSet.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     private function _getResourceAssociationSet(ResourceSetWrapper $resourceSet, ResourceType $resourceType, ResourceProperty $navigationProperty)
246 246
     {
247
-        $associationSetLookupKey = $resourceSet->getName().'_'.$resourceType->getFullName().'_'.$navigationProperty->getName();
247
+        $associationSetLookupKey = $resourceSet->getName() . '_' . $resourceType->getFullName() . '_' . $navigationProperty->getName();
248 248
         if (array_key_exists($associationSetLookupKey, $this->_resourceAssociationSets)) {
249 249
             return $this->_resourceAssociationSets[$associationSetLookupKey];
250 250
         }
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 
284 284
         $reverseAssociationSetLookupKey = null;
285 285
         if (!is_null($relatedEnd->getResourceProperty())) {
286
-            $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName().'_'.$relatedEnd->getResourceProperty()->getResourceType()->getFullName().'_'.$relatedEnd->getResourceProperty()->getName();
286
+            $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName() . '_' . $relatedEnd->getResourceProperty()->getResourceType()->getFullName() . '_' . $relatedEnd->getResourceProperty()->getName();
287 287
         } else {
288
-            $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName().'_Null_'.$resourceType->getFullName().'_'.$navigationProperty->getName();
288
+            $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName() . '_Null_' . $resourceType->getFullName() . '_' . $navigationProperty->getName();
289 289
         }
290 290
 
291 291
         if (array_key_exists($reverseAssociationSetLookupKey, $this->_resourceAssociationSets)) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     {
325 325
         $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType);
326 326
         $resourceAssociationTypesInNamespace = &$this->getResourceAssociationTypesForNamespace($resourceTypeNamespace);
327
-        $associationTypeLookupKey = $resourceType->getName().'_'.$navigationProperty->getName();
327
+        $associationTypeLookupKey = $resourceType->getName() . '_' . $navigationProperty->getName();
328 328
         if (array_key_exists($associationTypeLookupKey, $resourceAssociationTypesInNamespace)) {
329 329
             return $resourceAssociationTypesInNamespace[$associationTypeLookupKey];
330 330
         }
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
         $associationTypeEnd1Name = $associationTypeEnd2Name = null;
335 335
         $isBiDirectional = $resourceAssociationSet->isBidirectional();
336 336
         if ($isBiDirectional) {
337
-            $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName().'_'.$resourceAssociationSet->getEnd1()->getResourceProperty()->getName();
338
-            $associationTypeEnd2Name = $resourceAssociationSet->getEnd2()->getResourceType()->getName().'_'.$resourceAssociationSet->getEnd2()->getResourceProperty()->getName();
337
+            $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName() . '_' . $resourceAssociationSet->getEnd1()->getResourceProperty()->getName();
338
+            $associationTypeEnd2Name = $resourceAssociationSet->getEnd2()->getResourceType()->getName() . '_' . $resourceAssociationSet->getEnd2()->getResourceProperty()->getName();
339 339
         } else {
340 340
             if (!is_null($resourceAssociationSet->getEnd1()->getResourceProperty())) {
341 341
                 $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName();
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $resourceAssociationTypesInNamespace[$associationTypeLookupKey] = $resourceAssociationType;
371 371
         if ($isBiDirectional) {
372 372
             $relatedAssociationSetEnd = $resourceAssociationSet->getRelatedResourceAssociationSetEnd($resourceSet->getResourceSet(), $resourceType, $navigationProperty);
373
-            $relatedEndLookupKey = $relatedAssociationSetEnd->getResourceType()->getName().'_'.$relatedAssociationSetEnd->getResourceProperty()->getName();
373
+            $relatedEndLookupKey = $relatedAssociationSetEnd->getResourceType()->getName() . '_' . $relatedAssociationSetEnd->getResourceProperty()->getName();
374 374
             $resourceAssociationTypesInNamespace[$relatedEndLookupKey] = $resourceAssociationType;
375 375
         }
376 376
 
@@ -394,10 +394,10 @@  discard block
 block discarded – undo
394 394
                     $resourceAssociationSet->getEnd1() : $resourceAssociationSet->getEnd2();
395 395
         $end2 = $resourceAssociationSet->getRelatedResourceAssociationSetEnd($end1->getResourceSet(), $end1->getResourceType(), $end1->getResourceProperty());
396 396
         //e.g. Customer_Orders (w.r.t Northwind DB)
397
-        $associationTypeName = $end1->getResourceType()->getName().'_'.$end1->getResourceProperty()->getName();
397
+        $associationTypeName = $end1->getResourceType()->getName() . '_' . $end1->getResourceProperty()->getName();
398 398
         if (!is_null($end2->getResourceProperty())) {
399 399
             //Customer_Orders_Order_Customer
400
-            $associationTypeName .= '_'.$end2->getResourceType()->getName().'_'.$end2->getResourceProperty()->getName();
400
+            $associationTypeName .= '_' . $end2->getResourceType()->getName() . '_' . $end2->getResourceProperty()->getName();
401 401
         }
402 402
 
403 403
         return $associationTypeName;
Please login to merge, or discard this patch.
src/POData/Writers/Metadata/MetadataWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@
 block discarded – undo
366 366
      */
367 367
     private function _writeNavigationProperty(ResourceType $resourceType, $associationTypesInResourceTypeNamespace, ResourceProperty $navigationProperty)
368 368
     {
369
-        $associationTypeLookupName = $resourceType->getName().'_'.$navigationProperty->getName();
369
+        $associationTypeLookupName = $resourceType->getName() . '_' . $navigationProperty->getName();
370 370
         if (!array_key_exists($associationTypeLookupName, $associationTypesInResourceTypeNamespace)) {
371 371
             throw new InvalidOperationException(Messages::metadataWriterNoResourceAssociationSetForNavigationProperty($navigationProperty->getName(), $resourceType->getName()));
372 372
         }
Please login to merge, or discard this patch.
src/POData/Writers/Metadata/MetadataManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
      *                                            edm schema version for the metadata
213 213
      * @param EdmSchemaVersion $edmSchemaVersion
214 214
      */
215
-    public function getDataServiceAndEdmSchemaVersions(Version &$dsVersion, &$edmSchemaVersion)
215
+    public function getDataServiceAndEdmSchemaVersions(Version & $dsVersion, &$edmSchemaVersion)
216 216
     {
217 217
         if ($this->_metadataResourceTypeSet->hasNamedStreams()) {
218 218
             $dsVersion->raiseVersion(3, 0);
Please login to merge, or discard this patch.
src/POData/Writers/Metadata/MetadataResourceTypeSet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                 $resourceType = $resourceProperty->getResourceType();
177 177
                 $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType);
178 178
                 $resourceTypesInNamespace = $this->getResourceTypesForNamespace($resourceTypeNamespace);
179
-                if (!array_key_exists($resourceTypeNamespace.'.'.$resourceType->getName(), $resourceTypesInNamespace)) {
179
+                if (!array_key_exists($resourceTypeNamespace . '.' . $resourceType->getName(), $resourceTypesInNamespace)) {
180 180
                     continue;
181 181
                 }
182 182
             }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     {
238 238
         $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType);
239 239
         $resourceTypesInNamespace = &$this->getResourceTypesForNamespace($resourceTypeNamespace);
240
-        $resourceNameWithNamespace = $resourceTypeNamespace.'.'.$resourceType->getName();
240
+        $resourceNameWithNamespace = $resourceTypeNamespace . '.' . $resourceType->getName();
241 241
         if (!array_key_exists($resourceNameWithNamespace, $resourceTypesInNamespace)) {
242 242
             if ($resourceType->isMediaLinkEntry()) {
243 243
                 $this->_hasVisibleMediaLinkEntry = true;
Please login to merge, or discard this patch.
src/POData/Writers/ResponseWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 
79 79
         $service->getHost()->setResponseStatusCode(HttpStatus::CODE_OK);
80 80
         $service->getHost()->setResponseContentType($responseContentType);
81
-        $service->getHost()->setResponseVersion($dataServiceVersion->toString().';');
81
+        $service->getHost()->setResponseVersion($dataServiceVersion->toString() . ';');
82 82
         $service->getHost()->setResponseCacheControl(ODataConstants::HTTPRESPONSE_HEADER_CACHECONTROL_NOCACHE);
83 83
         $service->getHost()->getOperationContext()->outgoingResponse()->setStream($responseBody);
84 84
     }
Please login to merge, or discard this patch.