Test Failed
Pull Request — MetadataImplementationStep (#116)
by Alex
06:51
created
src/Models/ObjectMap/Entities/EntityField.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,6 @@
 block discarded – undo
211 211
     {
212 212
         $value = $primitiveType->getValue();
213 213
         return array_key_exists($value, self::$primitiveToEdmMapping) ?
214
-            self::$primitiveToEdmMapping[$value] :
215
-            EdmPrimitiveType::STRING;
214
+            self::$primitiveToEdmMapping[$value] : EdmPrimitiveType::STRING;
216 215
     }
217 216
 }
Please login to merge, or discard this patch.
src/Serialisers/IronicSerialiser.php 2 patches
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -443,7 +443,6 @@  discard block
 block discarded – undo
443 443
      * @param ResourceType &$resourceType Describes the type of
444 444
      *                                    bag object
445 445
      *
446
-
447 446
      * @return ODataPropertyContent
448 447
      */
449 448
     public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType)
@@ -771,10 +770,10 @@  discard block
 block discarded – undo
771 770
     {
772 771
         $queryParameterString = null;
773 772
         foreach ([ODataConstants::HTTPQUERY_STRING_FILTER,
774
-                     ODataConstants::HTTPQUERY_STRING_EXPAND,
775
-                     ODataConstants::HTTPQUERY_STRING_ORDERBY,
776
-                     ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
777
-                     ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) {
773
+                        ODataConstants::HTTPQUERY_STRING_EXPAND,
774
+                        ODataConstants::HTTPQUERY_STRING_ORDERBY,
775
+                        ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
776
+                        ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) {
778 777
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
779 778
             if (null !== $value) {
780 779
                 if (null !== $queryParameterString) {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             }
178 178
             // despite all set up, checking, etc, if we haven't picked a concrete resource type,
179 179
             // wheels have fallen off, so blow up
180
-            assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload '.$payloadClass);
180
+            assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload ' . $payloadClass);
181 181
         }
182 182
 
183 183
         // make sure we're barking up right tree
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $targClass = $resourceType->getInstanceType()->getName();
186 186
         assert(
187 187
             $entryObject->results instanceof $targClass,
188
-            'Object being serialised not instance of expected class, '.$targClass. ', is actually '.$payloadClass
188
+            'Object being serialised not instance of expected class, ' . $targClass . ', is actually ' . $payloadClass
189 189
         );
190 190
 
191 191
         $rawProp = $resourceType->getAllProperties();
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                 .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'
233 233
             );
234 234
             $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';
235
-            $propType = 'application/atom+xml;type='.$propTail;
235
+            $propType = 'application/atom+xml;type=' . $propTail;
236 236
             $propName = $prop->getName();
237 237
             $nuLink->title = $propName;
238 238
             $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      *
284 284
      * @return ODataFeed
285 285
      */
286
-    public function writeTopLevelElements(QueryResult &$entryObjects)
286
+    public function writeTopLevelElements(QueryResult & $entryObjects)
287 287
     {
288 288
         $res = $entryObjects->results;
289 289
         assert(is_array($res) || $res instanceof Collection, '!is_array($entryObjects->results)');
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet();
327 327
         $requestTop = $this->getRequest()->getTopOptionCount();
328 328
         $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet);
329
-        $requestTop = (null === $requestTop) ? $pageSize + 1 : $requestTop;
329
+        $requestTop = (null === $requestTop) ? $pageSize+1 : $requestTop;
330 330
 
331 331
         if (true === $entryObjects->hasMore && $requestTop > $pageSize) {
332 332
             $stackSegment = $setName;
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      *
416 416
      * @return ODataPropertyContent
417 417
      */
418
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
418
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
419 419
     {
420 420
         $result = $complexValue->results;
421 421
 
@@ -446,14 +446,14 @@  discard block
 block discarded – undo
446 446
 
447 447
      * @return ODataPropertyContent
448 448
      */
449
-    public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType)
449
+    public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)
450 450
     {
451 451
         $result = $BagValue->results;
452 452
 
453 453
         $propertyContent = new ODataPropertyContent();
454 454
         $odataProperty = new ODataProperty();
455 455
         $odataProperty->name = $propertyName;
456
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
456
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
457 457
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
458 458
 
459 459
         $propertyContent->properties[$propertyName] = $odataProperty;
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      *                                                 primitive property to be written
470 470
      * @return ODataPropertyContent
471 471
      */
472
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
472
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
473 473
     {
474 474
         assert(null != $resourceProperty, 'Resource property must not be null');
475 475
         $propertyContent = new ODataPropertyContent();
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         $segmentWrappers = $this->getStack()->getSegmentWrappers();
729 729
         $count = count($segmentWrappers);
730 730
 
731
-        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1];
731
+        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1];
732 732
     }
733 733
 
734 734
     /**
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
754 754
         assert(null !== $skipToken, '!is_null($skipToken)');
755 755
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
756
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
756
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
757 757
 
758 758
         return $skipToken;
759 759
     }
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 
788 788
         $topCountValue = $this->getRequest()->getTopOptionCount();
789 789
         if (null !== $topCountValue) {
790
-            $remainingCount = $topCountValue - $this->getRequest()->getTopCount();
790
+            $remainingCount = $topCountValue-$this->getRequest()->getTopCount();
791 791
             if (0 < $remainingCount) {
792 792
                 if (null !== $queryParameterString) {
793 793
                     $queryParameterString .= '&';
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
      *
823 823
      * @return string
824 824
      */
825
-    private function primitiveToString(IType &$type, $primitiveValue)
825
+    private function primitiveToString(IType & $type, $primitiveValue)
826 826
     {
827 827
         if ($type instanceof Boolean) {
828 828
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
      * @param $result
926 926
      * @return ODataBagContent|null
927 927
      */
928
-    protected function writeBagValue(ResourceType &$resourceType, $result)
928
+    protected function writeBagValue(ResourceType & $resourceType, $result)
929 929
     {
930 930
         assert(null == $result || is_array($result), 'Bag parameter must be null or array');
931 931
         $typeKind = $resourceType->getResourceTypeKind();
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
      * @param  string|null          $propertyName
959 959
      * @return ODataPropertyContent
960 960
      */
961
-    protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)
961
+    protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)
962 962
     {
963 963
         assert(is_object($result), 'Supplied $customObject must be an object');
964 964
 
Please login to merge, or discard this patch.