Completed
Branch master (6d49ce)
by
unknown
07:31
created
src/Http/Headers/HeaderParametersParser.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 $header            = $this->getHeader($request, HeaderInterface::HEADER_CONTENT_TYPE);
65 65
                 $contentTypeHeader = Header::parse($header, HeaderInterface::HEADER_CONTENT_TYPE);
66 66
             } catch (InvalidArgumentException $exception) {
67
-                $title  = T::t('Invalid ' . HeaderInterface::HEADER_CONTENT_TYPE . ' header.');
67
+                $title  = T::t('Invalid '.HeaderInterface::HEADER_CONTENT_TYPE.' header.');
68 68
                 $error  = new Error(null, null, null, null, $title);
69 69
                 E::throwException(new E([$error], E::HTTP_CODE_BAD_REQUEST, $exception));
70 70
             }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $header       = $this->getHeader($request, HeaderInterface::HEADER_ACCEPT);
75 75
             $acceptHeader = AcceptHeader::parse($header);
76 76
         } catch (InvalidArgumentException $exception) {
77
-            $title  = T::t('Invalid ' . HeaderInterface::HEADER_ACCEPT . ' header.');
77
+            $title  = T::t('Invalid '.HeaderInterface::HEADER_ACCEPT.' header.');
78 78
             $error  = new Error(null, null, null, null, $title);
79 79
             E::throwException(new E([$error], E::HTTP_CODE_BAD_REQUEST, $exception));
80 80
         }
@@ -82,8 +82,7 @@  discard block
 block discarded – undo
82 82
         $method = $request->getMethod();
83 83
 
84 84
         return $checkContentType === true ?
85
-            $this->factory->createHeaderParameters($method, $acceptHeader, $contentTypeHeader):
86
-            $this->factory->createNoContentHeaderParameters($method, $acceptHeader);
85
+            $this->factory->createHeaderParameters($method, $acceptHeader, $contentTypeHeader) : $this->factory->createNoContentHeaderParameters($method, $acceptHeader);
87 86
     }
88 87
 
89 88
     /**
Please login to merge, or discard this patch.
src/Http/Query/QueryParametersParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             foreach ($fieldSets as $type => $fields) {
93 93
                 // We expect fields to be comma separated or empty strings. Multi-dimension arrays are not allowed.
94 94
                 if (is_string($fields) === false) {
95
-                    $detail = T::t(self::PARAM_FIELDS . ' parameter values should be comma separated strings.');
95
+                    $detail = T::t(self::PARAM_FIELDS.' parameter values should be comma separated strings.');
96 96
                     throw new E($this->createInvalidQueryErrors($detail), E::HTTP_CODE_BAD_REQUEST);
97 97
                 }
98 98
                 $result[$type] = (empty($fields) === true ? [] : explode(',', $fields));
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
         if ($sortParam !== null) {
119 119
             foreach (explode(',', $sortParam) as $param) {
120 120
                 if (empty($param) === true) {
121
-                    $detail = T::t('Parameter ' . self::PARAM_SORT . ' should have valid value specified.');
121
+                    $detail = T::t('Parameter '.self::PARAM_SORT.' should have valid value specified.');
122 122
                     throw new E($this->createInvalidQueryErrors($detail), E::HTTP_CODE_BAD_REQUEST);
123 123
                 }
124 124
                 $isDesc = $isDesc = ($param[0] === '-');
125 125
                 $sortField = ltrim($param, '+-');
126 126
                 if (empty($sortField) === true) {
127
-                    $detail = T::t('Parameter ' . self::PARAM_SORT . ' should have valid name specified.');
127
+                    $detail = T::t('Parameter '.self::PARAM_SORT.' should have valid name specified.');
128 128
                     throw new E($this->createInvalidQueryErrors($detail), E::HTTP_CODE_BAD_REQUEST);
129 129
                 }
130 130
                 $sortParams[] = $this->factory->createSortParam($sortField, $isDesc === false);
Please login to merge, or discard this patch.
src/Http/Responses.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     {
175 175
         $resSubUrl = $this->getSchemaContainer()->getSchema($resource)->getSelfSubLink($resource)->getSubHref();
176 176
         $urlPrefix = $this->getUrlPrefix();
177
-        $location  = $urlPrefix . $resSubUrl;
177
+        $location  = $urlPrefix.$resSubUrl;
178 178
 
179 179
         return $location;
180 180
     }
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
             if (isset($params[MediaTypeInterface::PARAM_EXT])) {
201 201
                 $ext = $params[MediaTypeInterface::PARAM_EXT];
202 202
                 if (empty($ext) === false) {
203
-                    $contentType .= $separator . MediaTypeInterface::PARAM_EXT . '="' . $ext . '"';
204
-                    $separator   = ',';
203
+                    $contentType .= $separator.MediaTypeInterface::PARAM_EXT.'="'.$ext.'"';
204
+                    $separator = ',';
205 205
                 }
206 206
             }
207 207
 
208 208
             $extensions = $this->getSupportedExtensions();
209 209
             if ($extensions !== null && ($list = $extensions->getExtensions()) !== null && empty($list) === false) {
210
-                $contentType .= $separator . MediaTypeInterface::PARAM_SUPPORTED_EXT . '="' . $list . '"';
210
+                $contentType .= $separator.MediaTypeInterface::PARAM_SUPPORTED_EXT.'="'.$list.'"';
211 211
             }
212 212
 
213 213
             $headers[self::HEADER_CONTENT_TYPE] = $contentType;
Please login to merge, or discard this patch.