Passed
Push — master ( 9da2d4...b22c21 )
by Andreas
09:56
created
src/midcom/grid/provider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     private array $_search = [];
77 77
 
78
-    public function __construct(array|client $source, string $datatype = 'json')
78
+    public function __construct(array | client $source, string $datatype = 'json')
79 79
     {
80 80
         $this->_datatype = $datatype;
81 81
         if ($source instanceof client) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
     private function _convert_to_localdata() : string
204 204
     {
205
-        return "var " . $this->_grid->get_identifier() . '_entries = ' .  json_encode($this->get_rows()) . ";\n";
205
+        return "var " . $this->_grid->get_identifier() . '_entries = ' . json_encode($this->get_rows()) . ";\n";
206 206
     }
207 207
 
208 208
     private function _render_json()
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             $this->_sort_field = $query['sidx'];
234 234
             $this->_sort_direction = strtoupper($query['sord'] ?? 'ASC');
235 235
         }
236
-        if (   !empty($query['_search'])
236
+        if (!empty($query['_search'])
237 237
             && $query['_search'] === 'true') {
238 238
             foreach ($query as $field => $value) {
239 239
                 if (in_array($field, ['_search', 'nd', 'page', 'rows', 'sidx', 'sord'])) {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
         $this->_total_rows = $query->count();
258 258
 
259
-        if (   $this->_datatype == 'json'
259
+        if ($this->_datatype == 'json'
260 260
             && !empty($this->_results_per_page)) {
261 261
             $query->set_limit($this->_results_per_page);
262 262
             if (!empty($this->_offset)) {
Please login to merge, or discard this patch.