Completed
Push — master ( 6f5720...a297dc )
by Nikolay
07:30
created
src/POData/Common/ODataConstants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -772,7 +772,7 @@
 block discarded – undo
772 772
     const XML_DECIMAL_LITERAL_SUFFIX = 'M';
773 773
 
774 774
     //'L': Suffix for long (int64) type's representation
775
-    const XML_INT64_LITERAL_SUFFIX  = 'L';
775
+    const XML_INT64_LITERAL_SUFFIX = 'L';
776 776
 
777 777
     //'f': Suffix for float (single) type's representation
778 778
     const XML_SINGLE_LITERAL_SUFFIX  = 'f';
Please login to merge, or discard this patch.
src/POData/Common/ODataException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * 
32 32
      * @return void
33 33
      */
34
-    public function __construct($message, $statusCode, $errorCode= null)
34
+    public function __construct($message, $statusCode, $errorCode = null)
35 35
     {
36 36
         $this->_errorCode = $errorCode;
37 37
         $this->_statusCode = $statusCode;        
Please login to merge, or discard this patch.
src/POData/Common/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     public function getPort()
95 95
     {        
96
-        $port = isset ($this->_parts['port'])? $this->_parts['port'] : null;
96
+        $port = isset ($this->_parts['port']) ? $this->_parts['port'] : null;
97 97
         if ($port != null) {
98 98
             return $port;
99 99
         }
Please login to merge, or discard this patch.
src/POData/Common/Version.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function toString()
116 116
     {
117
-        return $this->major . '.' . $this->minor;
117
+        return $this->major.'.'.$this->minor;
118 118
     }
119 119
 
120 120
 	//Is there a better way to do static const of complex type?
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 	/** @var Version[] */
123 123
 	private static $fixedVersion;
124 124
 
125
-	private static function fillVersions(){
126
-		if(is_null(self::$fixedVersion)){
125
+	private static function fillVersions() {
126
+		if (is_null(self::$fixedVersion)) {
127 127
 			self::$fixedVersion = array(
128
-				1 => new Version(1,0),
129
-				2 => new Version(2,0),
130
-				3 => new Version(3,0),
128
+				1 => new Version(1, 0),
129
+				2 => new Version(2, 0),
130
+				3 => new Version(3, 0),
131 131
 			);
132 132
 		}
133 133
 	}
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 	}
140 140
 
141 141
 
142
-	public static function v2(){
142
+	public static function v2() {
143 143
 		self::fillVersions();
144 144
 		return self::$fixedVersion[2];
145 145
 	}
146 146
 
147 147
 
148
-	public static function v3(){
148
+	public static function v3() {
149 149
 		self::fillVersions();
150 150
 		return self::$fixedVersion[3];
151 151
 	}
Please login to merge, or discard this patch.
src/POData/Configuration/ServiceConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             );
194 194
         }
195 195
 
196
-        $this->_maxResultsPerCollection= $this->_checkIntegerNonNegativeParameter(
196
+        $this->_maxResultsPerCollection = $this->_checkIntegerNonNegativeParameter(
197 197
 			$maxResultPerCollection, 'setMaxResultsPerCollection'
198 198
         );
199 199
     }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function setEntitySetAccessRule($name, $rights)
251 251
     {
252 252
         if ($rights < EntitySetRights::NONE || $rights > EntitySetRights::ALL) {
253
-            throw new \InvalidArgumentException( Messages::configurationRightsAreNotInRange('$rights', 'setEntitySetAccessRule' ));
253
+            throw new \InvalidArgumentException(Messages::configurationRightsAreNotInRange('$rights', 'setEntitySetAccessRule'));
254 254
         }
255 255
 
256 256
         if (strcmp($name, '*') === 0) {
Please login to merge, or discard this patch.
src/POData/HttpProcessUtility.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getMimeType()
65 65
     {
66
-        return $this->_type . '/' . $this->_subType;
66
+        return $this->_type.'/'.$this->_subType;
67 67
     }
68 68
 
69 69
     /**
@@ -97,18 +97,18 @@  discard block
 block discarded – undo
97 97
             //get the odata parameter (if there is one)
98 98
             $candidateODataValue = null;
99 99
             $candidateParts = explode(';', $candidate);
100
-            if(count($candidateParts) > 1){
100
+            if (count($candidateParts) > 1) {
101 101
                 //is it safe to assume the mime type is always the first part?
102 102
                 $candidate = array_shift($candidateParts); //move off the first type matcher
103 103
                 //the rest look like QSPs..kinda so we can do this
104 104
                 parse_str(implode("&", $candidateParts), $candidateParts);
105
-                if(array_key_exists('odata', $candidateParts)){
105
+                if (array_key_exists('odata', $candidateParts)) {
106 106
                    $candidateODataValue = $candidateParts['odata'];
107 107
                 }
108 108
             }
109 109
 
110 110
             //ensure that the odata parameter values match
111
-            if($this->getODataValue() !== $candidateODataValue){
111
+            if ($this->getODataValue() !== $candidateODataValue) {
112 112
                 return -1;
113 113
             }
114 114
 
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
     }
698 698
 
699 699
 
700
-	public static function headerToServerKey($headerName){
701
-		return 'HTTP_' . strtoupper(str_replace('-', '_', $headerName));
700
+	public static function headerToServerKey($headerName) {
701
+		return 'HTTP_'.strtoupper(str_replace('-', '_', $headerName));
702 702
 	}
703 703
 }
704 704
\ No newline at end of file
Please login to merge, or discard this patch.
src/POData/ObjectModel/NavigationPropertyInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @param boolean          $expanded          Whether the navigation is expanded
24 24
      *                                            or not.   
25 25
      */
26
-    public function __construct(ResourceProperty &$resourceProperty, $expanded)
26
+    public function __construct(ResourceProperty & $resourceProperty, $expanded)
27 27
     {
28 28
         $this->resourceProperty = $resourceProperty;
29 29
         $this->expanded = $expanded;
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataMediaLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * @param string $contentType Mime type for Media content
62 62
      * @param string $eTag        eTag for media content
63 63
      */
64
-    function __construct ($name, $editLink, $srcLink, $contentType, $eTag)
64
+    function __construct($name, $editLink, $srcLink, $contentType, $eTag)
65 65
     {
66 66
         $this->contentType = $contentType;
67 67
         $this->editLink = $editLink;
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 1 patch
Spacing   +30 added lines, -31 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 $this->getCurrentResourceSetWrapper()->getName()
141 141
             );
142 142
             
143
-            $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
143
+            $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
144 144
         }
145 145
 
146 146
         return $url;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     public function writeTopLevelComplexObject(
192 192
 	    &$complexValue,
193 193
         $propertyName,
194
-        ResourceType &$resourceType
194
+        ResourceType & $resourceType
195 195
     ) {
196 196
 	    $propertyContent = new ODataPropertyContent();
197 197
         $this->_writeComplexValue(
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     public function writeTopLevelBagObject(
219 219
 	    &$BagValue,
220 220
         $propertyName,
221
-        ResourceType &$resourceType
221
+        ResourceType & $resourceType
222 222
     ) {
223 223
 
224 224
 	    $propertyContent = new ODataPropertyContent();
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     public function writeTopLevelPrimitive(
247 247
 	    &$primitiveValue,
248
-        ResourceProperty &$resourceProperty
248
+        ResourceProperty & $resourceProperty
249 249
     ) {
250 250
 	    $propertyContent = new ODataPropertyContent();
251 251
 	    $propertyContent->properties[] = new ODataProperty();
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                 $this->getCurrentResourceSetWrapper()->getName()
288 288
             );
289 289
 
290
-            $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
290
+            $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
291 291
             $title = $resourceType->getName();
292 292
             //TODO Resolve actual resource type
293 293
             $actualResourceType = $resourceType;
@@ -334,18 +334,18 @@  discard block
 block discarded – undo
334 334
      */
335 335
     private function _writeFeedElements(
336 336
         &$entryObjects,
337
-        ResourceType &$resourceType,
337
+        ResourceType & $resourceType,
338 338
         $title,
339 339
         $absoluteUri,
340 340
         $relativeUri,
341
-        ODataFeed &$feed
341
+        ODataFeed & $feed
342 342
     ) {
343 343
         $this->assert(is_array($entryObjects), '_writeFeedElements::is_array($entryObjects)');
344 344
         $feed->id = $absoluteUri;
345 345
         $feed->title = $title;
346 346
         $feed->selfLink = new ODataLink();
347 347
         $feed->selfLink->name = ODataConstants::ATOM_SELF_RELATION_ATTRIBUTE_VALUE;
348
-        $feed->selfLink->title =  $title;
348
+        $feed->selfLink->title = $title;
349 349
         $feed->selfLink->url = $relativeUri;
350 350
         
351 351
         if (empty($entryObjects)) {
@@ -389,11 +389,11 @@  discard block
 block discarded – undo
389 389
      */
390 390
     private function _writeObjectProperties(
391 391
 	    $customObject,
392
-        ResourceType &$resourceType, 
392
+        ResourceType & $resourceType, 
393 393
         $absoluteUri, 
394 394
         $relativeUri, 
395 395
         &$odataEntry, 
396
-        ODataPropertyContent &$odataPropertyContent
396
+        ODataPropertyContent & $odataPropertyContent
397 397
     ) {
398 398
         $resourceTypeKind = $resourceType->getResourceTypeKind();
399 399
         if (is_null($absoluteUri) == ($resourceTypeKind == ResourceTypeKind::ENTITY)
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                         $propertyValue,
465 465
                         $resourceProperty->getName(),
466 466
                         $resourceType2,
467
-                        $relativeUri . '/' . $resourceProperty->getName(),
467
+                        $relativeUri.'/'.$resourceProperty->getName(),
468 468
                         $odataPropertyContent
469 469
                     );
470 470
                 } else {
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                             $propertyValue,
477 477
                             $resourceProperty->getName(),
478 478
                             $resourceType1,
479
-                            $relativeUri . '/' . $resourceProperty->getName(),
479
+                            $relativeUri.'/'.$resourceProperty->getName(),
480 480
                             $odataPropertyContent
481 481
                         );
482 482
                     } else if ($resourceProperty->getKind() == ResourcePropertyKind::PRIMITIVE 
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
                         $propertyValue,
542 542
                         $propertyName,
543 543
                         $bagResourceType,
544
-                        $relativeUri . '/' . $propertyName,
544
+                        $relativeUri.'/'.$propertyName,
545 545
                         $odataPropertyContent
546 546
                     );
547 547
                 } else if (ResourceProperty::sIsKindOf($propertyTypeKind, ResourcePropertyKind::PRIMITIVE)) {
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                         $propertyValue,
555 555
                         $propertyName,
556 556
                         $complexResourceType,
557
-                        $relativeUri . '/' . $propertyName,
557
+                        $relativeUri.'/'.$propertyName,
558 558
                         $odataPropertyContent
559 559
                     );
560 560
                 } else {
@@ -569,17 +569,16 @@  discard block
 block discarded – undo
569 569
             foreach ($navigationProperties as $navigationPropertyInfo) {
570 570
                 $propertyName = $navigationPropertyInfo->resourceProperty->getName();
571 571
                 $type = $navigationPropertyInfo->resourceProperty->getKind() == ResourcePropertyKind::RESOURCE_REFERENCE ? 
572
-                    'application/atom+xml;type=entry':
573
-                    'application/atom+xml;type=feed';
572
+                    'application/atom+xml;type=entry' : 'application/atom+xml;type=feed';
574 573
                 $link = new ODataLink();
575
-                $link->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propertyName; 
574
+                $link->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propertyName; 
576 575
                 $link->title = $propertyName;
577 576
                 $link->type = $type;
578
-                $link->url = $relativeUri . '/' . $propertyName;
577
+                $link->url = $relativeUri.'/'.$propertyName;
579 578
 
580 579
                 if ($navigationPropertyInfo->expanded) {
581
-                    $propertyRelativeUri = $relativeUri . '/' . $propertyName;
582
-                    $propertyAbsoluteUri = trim($absoluteUri, '/') . '/' . $propertyName;
580
+                    $propertyRelativeUri = $relativeUri.'/'.$propertyName;
581
+                    $propertyAbsoluteUri = trim($absoluteUri, '/').'/'.$propertyName;
583 582
                     $needPop = $this->pushSegmentForNavigationProperty($navigationPropertyInfo->resourceProperty);
584 583
                     $navigationPropertyKind = $navigationPropertyInfo->resourceProperty->getKind();
585 584
                     $this->assert(
@@ -645,7 +644,7 @@  discard block
 block discarded – undo
645 644
      * @return void
646 645
      */
647 646
     private function _writePrimitiveValue(&$primitiveValue, 
648
-        ResourceProperty &$resourceProperty, ODataProperty &$odataProperty
647
+        ResourceProperty & $resourceProperty, ODataProperty & $odataProperty
649 648
     ) {
650 649
         if (is_object($primitiveValue)) {
651 650
             //TODO ERROR: The property 'PropertyName' 
@@ -684,8 +683,8 @@  discard block
 block discarded – undo
684 683
      * @return void
685 684
      */
686 685
     private function _writeComplexValue(&$complexValue,
687
-        $propertyName, ResourceType &$resourceType, $relativeUri,
688
-        ODataPropertyContent &$odataPropertyContent
686
+        $propertyName, ResourceType & $resourceType, $relativeUri,
687
+        ODataPropertyContent & $odataPropertyContent
689 688
     ) {
690 689
         $odataProperty = new ODataProperty();
691 690
         $odataProperty->name = $propertyName;
@@ -724,8 +723,8 @@  discard block
 block discarded – undo
724 723
      * @return void
725 724
      */
726 725
     private function _writeBagValue(&$BagValue,
727
-        $propertyName, ResourceType &$resourceType, $relativeUri,
728
-        ODataPropertyContent &$odataPropertyContent
726
+        $propertyName, ResourceType & $resourceType, $relativeUri,
727
+        ODataPropertyContent & $odataPropertyContent
729 728
     ) {
730 729
         $bagItemResourceTypeKind = $resourceType->getResourceTypeKind();
731 730
         $this->assert(
@@ -737,7 +736,7 @@  discard block
 block discarded – undo
737 736
 
738 737
         $odataProperty = new ODataProperty();
739 738
         $odataProperty->name = $propertyName;
740
-        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() .')';
739
+        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
741 740
         if (is_null($BagValue) || (is_array($BagValue) && empty ($BagValue))) {
742 741
             $odataProperty->value = null;
743 742
         } else {
@@ -784,10 +783,10 @@  discard block
 block discarded – undo
784 783
      */
785 784
     private function _writeMediaResourceMetadata(
786 785
         $entryObject,
787
-        ResourceType &$resourceType,
786
+        ResourceType & $resourceType,
788 787
         $title,
789 788
         $relativeUri,
790
-        ODataEntry &$odataEntry
789
+        ODataEntry & $odataEntry
791 790
     ) {
792 791
         if ($resourceType->isMediaLinkEntry()) {
793 792
             $odataEntry->isMediaLinkEntry = true;
@@ -833,7 +832,7 @@  discard block
 block discarded – undo
833 832
      *                                            
834 833
      * @return void
835 834
      */
836
-    private function _primitiveToString(ResourceType &$primtiveResourceType,
835
+    private function _primitiveToString(ResourceType & $primtiveResourceType,
837 836
         $primitiveValue, &$stringValue
838 837
     ) {
839 838
         $type = $primtiveResourceType->getInstanceType();
@@ -868,8 +867,8 @@  discard block
 block discarded – undo
868 867
      * @return void
869 868
      */
870 869
     private function _complexObjectToContent(&$complexValue,
871
-        $propertyName, ResourceType &$resourceType, $relativeUri,
872
-        ODataPropertyContent &$odataPropertyContent
870
+        $propertyName, ResourceType & $resourceType, $relativeUri,
871
+        ODataPropertyContent & $odataPropertyContent
873 872
     ) {
874 873
         $count = count($this->complexTypeInstanceCollection);
875 874
         for ($i = 0; $i < $count; $i++) {
Please login to merge, or discard this patch.