Passed
Pull Request — master (#263)
by Christopher
03:07
created
src/POData/Providers/Metadata/Type/Binary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataMediaLink.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@
 block discarded – undo
78 78
         $this->eTag        = $eTag;
79 79
         $this->name        = $name;
80 80
         $this->srcLink     = $srcLink;
81
-        $this->rel         = (null !== $rel) ? $rel :
82
-            ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name;
81
+        $this->rel         = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name;
83 82
     }
84 83
 }
Please login to merge, or discard this patch.
src/POData/OperationContext/ServiceHost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -615,7 +615,7 @@
 block discarded – undo
615 615
      */
616 616
     public function setResponseStatusCode(int $value): void
617 617
     {
618
-        $floor = floor($value / 100);
618
+        $floor = floor($value/100);
619 619
         if ($floor >= 1 && $floor <= 5) {
620 620
             $statusDescription = HttpStatus::getStatusDescription($value);
621 621
             if (null !== $statusDescription) {
Please login to merge, or discard this patch.
src/POData/ObjectModel/CynicSerialiser.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -877,10 +877,10 @@
 block discarded – undo
877 877
     {
878 878
         $queryParameterString = null;
879 879
         foreach ([ODataConstants::HTTPQUERY_STRING_FILTER,
880
-                     ODataConstants::HTTPQUERY_STRING_EXPAND,
881
-                     ODataConstants::HTTPQUERY_STRING_ORDERBY,
882
-                     ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
883
-                     ODataConstants::HTTPQUERY_STRING_SELECT,] as $queryOption) {
880
+                        ODataConstants::HTTPQUERY_STRING_EXPAND,
881
+                        ODataConstants::HTTPQUERY_STRING_ORDERBY,
882
+                        ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
883
+                        ODataConstants::HTTPQUERY_STRING_SELECT,] as $queryOption) {
884 884
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
885 885
             if (null !== $value) {
886 886
                 if (null !== $queryParameterString) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $pageSize    = $this->getService()->getConfiguration()->getEntitySetPageSize(
135 135
             $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet()
136 136
         );
137
-        $requestTop  = $this->getRequest()->getTopOptionCount() ?? PHP_INT_MAX ;
137
+        $requestTop  = $this->getRequest()->getTopOptionCount() ?? PHP_INT_MAX;
138 138
         $entryObjects->hasMore &= $requestTop > $pageSize;
139 139
 
140 140
         $this->loadStackIfEmpty();
@@ -152,8 +152,7 @@  discard block
 block discarded – undo
152 152
                 $this->getRequest()->getIdentifier()
153 153
             ),
154 154
             $this->getRequest()->queryType == QueryType::ENTITIES_WITH_COUNT() ?
155
-                $this->getRequest()->getCountValue() :
156
-                null,
155
+                $this->getRequest()->getCountValue() : null,
157 156
             $entryObjects->hasMore ? new ODataLink(
158 157
                 ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING,
159 158
                 null,
@@ -162,7 +161,7 @@  discard block
 block discarded – undo
162 161
                 '/' . $this->getRequest()->getTargetResourceSetWrapper()->getName() .
163 162
                 $this->getNextLinkUri(end($results))
164 163
             ) : null,
165
-            array_map(function($entry){
164
+            array_map(function ($entry) {
166 165
                 return $this->writeTopLevelElement(
167 166
                     $entry instanceof QueryResult ? $entry : new QueryResult($entry)
168 167
                 );
@@ -731,7 +730,7 @@  discard block
 block discarded – undo
731 730
             return false;
732 731
         }
733 732
 
734
-        return 0 == ($value % 4);
733
+        return 0 == ($value%4);
735 734
     }
736 735
 
737 736
     /**
@@ -862,7 +861,7 @@  discard block
 block discarded – undo
862 861
                      ODataConstants::HTTPQUERY_STRING_EXPAND,
863 862
                      ODataConstants::HTTPQUERY_STRING_ORDERBY,
864 863
                      ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
865
-                     ODataConstants::HTTPQUERY_STRING_SELECT,] as $queryOption) {
864
+                     ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) {
866 865
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
867 866
             if (null !== $value) {
868 867
                 if (null !== $queryParameterString) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
                 '/' . $this->getRequest()->getTargetResourceSetWrapper()->getName() .
163 163
                 $this->getNextLinkUri(end($results))
164 164
             ) : null,
165
-            array_map(function($entry){
165
+            array_map(function($entry) {
166 166
                 return $this->writeTopLevelElement(
167 167
                     $entry instanceof QueryResult ? $entry : new QueryResult($entry)
168 168
                 );
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
             MimeTypes::MIME_APPLICATION_JSON_FULL_META,
599 599
             MimeTypes::MIME_APPLICATION_JSON_NO_META,
600 600
             MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META,
601
-            MimeTypes::MIME_APPLICATION_JSON_VERBOSE,];
601
+            MimeTypes::MIME_APPLICATION_JSON_VERBOSE, ];
602 602
 
603 603
         // The Accept request-header field specifies media types which are acceptable for the response
604 604
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                     $requestAcceptText,
674 674
                     array_merge(
675 675
                         [MimeTypes::MIME_APPLICATION_XML,
676
-                            MimeTypes::MIME_TEXTXML,],
676
+                            MimeTypes::MIME_TEXTXML, ],
677 677
                         $baseMimeTypes
678 678
                     )
679 679
                 );
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/Type/Guid.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,12 +102,12 @@
 block discarded – undo
102 102
             $patt = ['/^(\'[0-9a-fA-F]{32}\')?$/',
103 103
                 '/^(\'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\')?$/',
104 104
                 '/^\'\{?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?\')?$/',
105
-                '/^\'\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?\')?$/',];
105
+                '/^\'\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?\')?$/', ];
106 106
         } else {
107 107
             $patt = ['/^([0-9a-fA-F]{32})?$/',
108 108
                 '/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})?$/',
109 109
                 '/^\{?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?)?$/',
110
-                '/^\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?)?$/',];
110
+                '/^\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?)?$/', ];
111 111
         }
112 112
 
113 113
         foreach ($patt as $pattern) {
Please login to merge, or discard this patch.
src/POData/Readers/Atom/Processors/FeedProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     public function handleStartMetadataCount()
98 98
     {
99 99
         $this->enqueueEnd(function () {
100
-            $this->oDataFeed->rowCount = (int)$this->popCharData();
100
+            $this->oDataFeed->rowCount = (int) $this->popCharData();
101 101
         });
102 102
     }
103 103
 
Please login to merge, or discard this patch.
src/POData/ObjectModel/CynicDeserialiser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
         assert($set instanceof ResourceSet, get_class($set));
149 149
         $type       = $set->getResourceType();
150 150
         $properties = $this->getDeserialiser()->bulkDeserialise($type, $content);
151
-        $properties = (object)$properties;
151
+        $properties = (object) $properties;
152 152
 
153 153
         if ($isCreate) {
154 154
             $result = $this->getWrapper()->createResourceforResourceSet($set, null, $properties);
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByLeafNode.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
             if ($flag1 && $flag2) {
135 135
                 return 0;
136 136
             } elseif ($flag1) {
137
-                return $ascend * -1;
137
+                return $ascend*-1;
138 138
             } elseif ($flag2) {
139
-                return $ascend * 1;
139
+                return $ascend*1;
140 140
             }
141 141
             $type = $this->resourceProperty->getInstanceType();
142 142
             if ($type instanceof DateTime) {
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
                 $result = strcmp($accessor1, $accessor2);
148 148
             } else {
149 149
                 $delta  = $accessor1 - $accessor2;
150
-                $result = (0 == $delta) ? 0 : $delta / abs($delta);
150
+                $result = (0 == $delta) ? 0 : $delta/abs($delta);
151 151
             }
152 152
 
153
-            return $ascend * $result;
153
+            return $ascend*$result;
154 154
         };
155 155
 
156 156
         return $retVal;
Please login to merge, or discard this patch.