Passed
Push — main ( da05ca...3310d4 )
by Thierry
02:13
created
src/Driver/Facades/SelectFacade.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * @var SelectQuery|null
20 20
      */
21
-    private SelectQuery|null $selectQuery = null;
21
+    private SelectQuery | null $selectQuery = null;
22 22
 
23 23
     /**
24 24
      * @var SelectResult|null
25 25
      */
26
-    private SelectResult|null $selectResult = null;
26
+    private SelectResult | null $selectResult = null;
27 27
 
28 28
     /**
29 29
      * @param AbstractFacade $dbFacade
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
             $query = $this->driver->getRowCountQuery($table,
110 110
                 $selectEntity->where, $this->hasGroupsInFields($selectEntity),
111 111
                 $selectEntity->group);
112
-            return (int)$this->driver->result($query);
113
-        } catch(Exception) {
112
+            return (int) $this->driver->result($query);
113
+        } catch (Exception) {
114 114
             return -1;
115 115
         }
116 116
     }
Please login to merge, or discard this patch.
src/Page/Dql/SelectResult.php 1 patch
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,11 +45,9 @@  discard block
 block discarded – undo
45 45
         $value = $selectEntity->queryOptions["columns"][$valueKey] ?? [];
46 46
 
47 47
         $fun = $value["fun"] ?? '';
48
-        $fieldKey = !$selectEntity->select ? $key :
49
-            ($value["col"] ?? current($selectEntity->select));
48
+        $fieldKey = !$selectEntity->select ? $key : ($value["col"] ?? current($selectEntity->select));
50 49
         $field = $selectEntity->fields[$fieldKey];
51
-        $name = !$field ? ($fun ? "*" : $key) :
52
-            $this->page->fieldName($field, $rank);
50
+        $name = !$field ? ($fun ? "*" : $key) : $this->page->fieldName($field, $rank);
53 51
 
54 52
         return [$fun, $name, $field];
55 53
     }
@@ -178,8 +176,7 @@  discard block
 block discarded – undo
178 176
     private function getRowIdMd5Key(string $key, string $collation): string
179 177
     {
180 178
         return $this->driver->jush() !== 'sql' ||
181
-            preg_match("~^utf8~", $collation) ? $key :
182
-                "CONVERT($key USING " . $this->driver->charset() . ")";
179
+            preg_match("~^utf8~", $collation) ? $key : "CONVERT($key USING " . $this->driver->charset() . ")";
183 180
     }
184 181
 
185 182
     /**
Please login to merge, or discard this patch.