Passed
Push — main ( 65d634...249587 )
by Thierry
19:37 queued 17:18
created
src/Db/Facades/SelectFacade.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * @var SelectEntity|null
37 37
      */
38
-    private SelectEntity|null $selectEntity = null;
38
+    private SelectEntity | null $selectEntity = null;
39 39
 
40 40
     /**
41 41
      * @param AbstractFacade $dbFacade
@@ -116,11 +116,9 @@  discard block
 block discarded – undo
116 116
         $value = $this->selectEntity->queryOptions["columns"][$valueKey] ?? [];
117 117
 
118 118
         $fun = $value["fun"] ?? '';
119
-        $fieldKey = !$this->selectEntity->select ? $key :
120
-            ($value["col"] ?? current($this->selectEntity->select));
119
+        $fieldKey = !$this->selectEntity->select ? $key : ($value["col"] ?? current($this->selectEntity->select));
121 120
         $field = $this->selectEntity->fields[$fieldKey];
122
-        $name = !$field ? ($fun ? "*" : $key) :
123
-            $this->admin->fieldName($field, $rank);
121
+        $name = !$field ? ($fun ? "*" : $key) : $this->admin->fieldName($field, $rank);
124 122
 
125 123
         return [$fun, $name, $field];
126 124
     }
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
     private function getRowIdMd5Key(string $key, string $collation): string
247 245
     {
248 246
         return $this->driver->jush() != 'sql' ||
249
-            preg_match("~^utf8~", $collation) ? $key :
250
-                "CONVERT($key USING " . $this->driver->charset() . ")";
247
+            preg_match("~^utf8~", $collation) ? $key : "CONVERT($key USING " . $this->driver->charset() . ")";
251 248
     }
252 249
 
253 250
     /**
@@ -366,8 +363,8 @@  discard block
 block discarded – undo
366 363
             $query = $this->driver->getRowCountQuery($table,
367 364
                 $this->selectEntity->where, $this->hasGroupsInFields(),
368 365
                 $this->selectEntity->group);
369
-            return (int)$this->driver->result($query);
370
-        } catch(Exception $_) {
366
+            return (int) $this->driver->result($query);
367
+        } catch (Exception $_) {
371 368
             return -1;
372 369
         }
373 370
     }
Please login to merge, or discard this patch.
src/Db/Facades/Select/SelectQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         $col = $value['col'];
287 287
         $prefix = '';
288 288
         if ($op === 'FIND_IN_SET') {
289
-            $prefix = $op .'(' . $this->driver->quote($value['val']) . ', ';
289
+            $prefix = $op . '(' . $this->driver->quote($value['val']) . ', ';
290 290
         }
291 291
         $condition = $this->getWhereCondition($value, $fields);
292 292
         if ($col !== '') {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      */
316 316
     private function getMatchExpression(IndexEntity $index, int $i): string
317 317
     {
318
-        $columns = array_map(function ($column) {
318
+        $columns = array_map(function($column) {
319 319
             return $this->driver->escapeId($column);
320 320
         }, $index->columns);
321 321
         $match = $this->driver->quote($this->utils->input->values['fulltext'][$i]);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             }
340 340
         }
341 341
         foreach ((array) $this->utils->input->values['where'] as $value) {
342
-            if (($value['col'] !== '' ||  $value['val'] !== '') &&
342
+            if (($value['col'] !== '' || $value['val'] !== '') &&
343 343
                 in_array($value['op'], $this->driver->operators())) {
344 344
                 $selectEntity->where[] = $this
345 345
                     ->getSelectExpression($value, $selectEntity->fields);
Please login to merge, or discard this patch.
src/Db/Facades/Select/SelectEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
     /**
106 106
      * @var string|null
107 107
      */
108
-    public string|null $error = null;
108
+    public string | null $error = null;
109 109
 
110 110
     /**
111 111
      * @var TableSelectEntity
Please login to merge, or discard this patch.
src/Admin/Admin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,8 +145,7 @@
 block discarded – undo
145 145
         }
146 146
         if ($this->isMail($value)) {
147 147
             return '<a href="' . $this->utils->html("mailto:$value") . '">' . $value . '</a>';
148
-        }
149
-        elseif ($this->isUrl($value)) {
148
+        } elseif ($this->isUrl($value)) {
150 149
             // IE 11 and all modern browsers hide referrer
151 150
             return '<a href="' . $this->utils->html($value) . '"' . $this->blankTarget() . '>' . $value . '</a>';
152 151
         }
Please login to merge, or discard this patch.