Completed
Push — master ( 18f3e5...5c72c7 )
by Ivan
11:19
created
src/driver/postgre/Result.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
37 37
             $temp = @\pg_query(
38 38
                 $this->driver,
39 39
                 $sequence ?
40
-                    'SELECT currval('.@\pg_escape_string($this->driver, $sequence).')' :
41
-                    'SELECT lastval()'
40
+                    'SELECT currval('.@\pg_escape_string($this->driver, $sequence).')' : 'SELECT lastval()'
42 41
             );
43 42
             if ($temp) {
44 43
                 $res = \pg_fetch_row($temp);
@@ -76,8 +75,8 @@  discard block
 block discarded – undo
76 75
     }
77 76
     public function next(): void
78 77
     {
79
-        $this->fetched ++;
80
-        $this->last = \pg_fetch_array($this->statement, null, \PGSQL_ASSOC)?:null;
78
+        $this->fetched++;
79
+        $this->last = \pg_fetch_array($this->statement, null, \PGSQL_ASSOC) ?: null;
81 80
         if (is_array($this->last) && count($this->last)) {
82 81
             $this->cast();
83 82
         }
@@ -102,15 +101,15 @@  discard block
 block discarded – undo
102 101
                 case 'int2':
103 102
                 case 'int4':
104 103
                 case 'int8':
105
-                    $this->last[$k] = (int)$v;
104
+                    $this->last[$k] = (int) $v;
106 105
                     break;
107 106
                 case 'bit':
108 107
                 case 'bool':
109
-                    $this->last[$k] = $v !== 'f' && (int)$v ? true : false;
108
+                    $this->last[$k] = $v !== 'f' && (int) $v ? true : false;
110 109
                     break;
111 110
                 case 'float4':
112 111
                 case 'float8':
113
-                    $this->last[$k] = (float)$v;
112
+                    $this->last[$k] = (float) $v;
114 113
                 case 'money':
115 114
                 case 'numeric':
116 115
                     // TODO:
Please login to merge, or discard this patch.
src/driver/oracle/Result.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     }
25 25
     public function affected() : int
26 26
     {
27
-        return (int)\oci_num_rows($this->statement);
27
+        return (int) \oci_num_rows($this->statement);
28 28
     }
29 29
     public function insertID(string $sequence = null): mixed
30 30
     {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function count(): int
39 39
     {
40
-        return (int)\oci_num_rows($this->statement);
40
+        return (int) \oci_num_rows($this->statement);
41 41
     }
42 42
 
43 43
     public function key(): mixed
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
     }
66 66
     public function next(): void
67 67
     {
68
-        $this->fetched ++;
69
-        $this->last = \oci_fetch_array($this->statement, \OCI_ASSOC + \OCI_RETURN_NULLS + \OCI_RETURN_LOBS)?:null;
68
+        $this->fetched++;
69
+        $this->last = \oci_fetch_array($this->statement, \OCI_ASSOC +\OCI_RETURN_NULLS +\OCI_RETURN_LOBS) ?: null;
70 70
         $this->cast();
71 71
     }
72 72
     public function valid(): bool
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 $this->types[$v] = \oci_field_type($this->statement, $k + 1);
81 81
                 if ($this->types[$v] === 'NUMBER') {
82 82
                     $size = \oci_field_size($this->statement, $k + 1);
83
-                    if ((int)(explode(',', $size, 2)[1] ?? '') > 0) {
83
+                    if ((int) (explode(',', $size, 2)[1] ?? '') > 0) {
84 84
                         $this->types[$v] === 'FLOAT';
85 85
                     }
86 86
                 }
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
             }
93 93
             switch ($this->types[$k]) {
94 94
                 case 'NUMBER':
95
-                    $this->last[$k] = (int)$v;
95
+                    $this->last[$k] = (int) $v;
96 96
                     break;
97 97
                 case 'FLOAT':
98
-                    $this->last[$k] = (float)$v;
98
+                    $this->last[$k] = (float) $v;
99 99
                     break;
100 100
             }
101 101
         }
Please login to merge, or discard this patch.