Completed
Pull Request — master (#782)
by
unknown
01:20
created
src/Tools/Utils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
                     // Hash query param (eg filter[name]=john should become "filter[name]": "john")
146 146
                     foreach ($value as $item => $itemValue) {
147
-                        $item = strpos($item, '[')!==false ? str_replace(['%5B', '%5D'], ['[', ']'], urlencode($item)) : '[' . urlencode($item) . ']';
147
+                        $item = strpos($item, '[') !== false ? str_replace(['%5B', '%5D'], ['[', ']'], urlencode($item)) : '[' . urlencode($item) . ']';
148 148
                         $qs .= "$paramName" . $item . '=' . urlencode($itemValue) . '&';
149 149
                     }
150 150
                 }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     }
209 209
 
210 210
                     foreach ($value as $item => $itemValue) {
211
-                        $item = strpos($item, '[')!==false ? $item : "[$item]";
211
+                        $item = strpos($item, '[') !== false ? $item : "[$item]";
212 212
 
213 213
                         $output .= str_repeat(" ", $spacesIndentation);
214 214
                         $output .= "$quote$parameter" . "$item$quote$delimiter $quote$itemValue$quote,\n";
Please login to merge, or discard this patch.