Completed
Pull Request — master (#3)
by Rémy
08:33
created
Source/QueryBuilder.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         $select = $expression;
89 89
         if ($as !== null) {
90
-            $select .= ' AS ' . $this->quoteIdentifier($as);
90
+            $select .= ' AS '.$this->quoteIdentifier($as);
91 91
         }
92 92
         $this->select[] = $select;
93 93
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
     // where
99 99
     public function where(string $column, $value): QueryBuilder
100 100
     {
101
-        $this->where[] = $this->quoteIdentifier($column) . ' = ?';
101
+        $this->where[] = $this->quoteIdentifier($column).' = ?';
102 102
         $this->buildParams[] = $value;
103 103
         return $this;
104 104
     }
105 105
 
106 106
     public function whereNot(string $column, $value): QueryBuilder
107 107
     {
108
-        $this->where[] = $this->quoteIdentifier($column) . ' != ?';
108
+        $this->where[] = $this->quoteIdentifier($column).' != ?';
109 109
         $this->buildParams[] = $value;
110 110
         return $this;
111 111
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function whereExpr(string $column, string $expression): QueryBuilder
135 135
     {
136
-        $this->where[] = $this->quoteIdentifier($column) . ' = ' . $expression;
136
+        $this->where[] = $this->quoteIdentifier($column).' = '.$expression;
137 137
         return $this;
138 138
     }
139 139
 
@@ -148,48 +148,48 @@  discard block
 block discarded – undo
148 148
 
149 149
     public function whereLt(string $column, $value): QueryBuilder
150 150
     {
151
-        $this->where[] = $this->quoteIdentifier($column) . ' < ?';
151
+        $this->where[] = $this->quoteIdentifier($column).' < ?';
152 152
         $this->buildParams[] = $value;
153 153
         return $this;
154 154
     }
155 155
 
156 156
     public function whereLte(string $column, $value): QueryBuilder
157 157
     {
158
-        $this->where[] = $this->quoteIdentifier($column) . ' <= ?';
158
+        $this->where[] = $this->quoteIdentifier($column).' <= ?';
159 159
         $this->buildParams[] = $value;
160 160
         return $this;
161 161
     }
162 162
 
163 163
     public function whereGt(string $column, $value): QueryBuilder
164 164
     {
165
-        $this->where[] = $this->quoteIdentifier($column) . ' > ?';
165
+        $this->where[] = $this->quoteIdentifier($column).' > ?';
166 166
         $this->buildParams[] = $value;
167 167
         return $this;
168 168
     }
169 169
 
170 170
     public function whereGte(string $column, $value): QueryBuilder
171 171
     {
172
-        $this->where[] = $this->quoteIdentifier($column) . ' >= ?';
172
+        $this->where[] = $this->quoteIdentifier($column).' >= ?';
173 173
         $this->buildParams[] = $value;
174 174
         return $this;
175 175
     }
176 176
 
177 177
     public function whereNotNull(string $column): QueryBuilder
178 178
     {
179
-        $this->where[] = $this->quoteIdentifier($column) . ' IS NOT NULL';
179
+        $this->where[] = $this->quoteIdentifier($column).' IS NOT NULL';
180 180
         return $this;
181 181
     }
182 182
 
183 183
     public function whereNull(string $column): QueryBuilder
184 184
     {
185
-        $this->where[] = $this->quoteIdentifier($column) . ' IS NULL';
185
+        $this->where[] = $this->quoteIdentifier($column).' IS NULL';
186 186
         return $this;
187 187
     }
188 188
 
189 189
     public function whereIn(string $column, array $data): QueryBuilder
190 190
     {
191
-        $this->where[] = $this->quoteIdentifier($column) . ' IN (' .
192
-            substr(str_repeat('?, ', count($data)), 0, -2) .
191
+        $this->where[] = $this->quoteIdentifier($column).' IN ('.
192
+            substr(str_repeat('?, ', count($data)), 0, -2).
193 193
             ')';
194 194
         $this->buildParams = array_merge($this->buildParams, $data);
195 195
         return $this;
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
     // order by
199 199
     public function orderByAsc(string $column): QueryBuilder
200 200
     {
201
-        $this->order[] = $this->quoteIdentifier($column) . ' ASC';
201
+        $this->order[] = $this->quoteIdentifier($column).' ASC';
202 202
         return $this;
203 203
     }
204 204
 
205 205
     public function orderByDesc(string $column): QueryBuilder
206 206
     {
207
-        $this->order[] = $this->quoteIdentifier($column) . ' DESC';
207
+        $this->order[] = $this->quoteIdentifier($column).' DESC';
208 208
         return $this;
209 209
     }
210 210
 
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
         }
248 248
 
249 249
         // from
250
-        $query .= ' FROM ' . $this->quoteIdentifier($this->table);
250
+        $query .= ' FROM '.$this->quoteIdentifier($this->table);
251 251
 
252 252
         // where
253 253
         if (!empty($this->where)) {
254
-            $query .= ' WHERE ' . implode(' AND ', $this->where);
254
+            $query .= ' WHERE '.implode(' AND ', $this->where);
255 255
 
256 256
             // params (CAUTION, we override the array, faster and not used before!)
257 257
             $params = $this->buildParams;
@@ -259,16 +259,16 @@  discard block
 block discarded – undo
259 259
 
260 260
         // order
261 261
         if (!empty($this->order)) {
262
-            $query .= ' ORDER BY ' . implode(', ', $this->order);
262
+            $query .= ' ORDER BY '.implode(', ', $this->order);
263 263
         }
264 264
 
265 265
         // limit
266 266
         if ($this->limit !== null) {
267
-            $query .= ' LIMIT ' . (int)$this->limit;
267
+            $query .= ' LIMIT '.(int)$this->limit;
268 268
 
269 269
             // offset
270 270
             if ($this->offset !== null) {
271
-                $query .= ' OFFSET ' . (int)$this->offset;
271
+                $query .= ' OFFSET '.(int)$this->offset;
272 272
             }
273 273
         }
274 274
 
Please login to merge, or discard this patch.
Source/QueryBuilderException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.
Source/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->params = $params;
55 55
     }
56 56
 
57
-    public function getParams(): ?array
57
+    public function getParams(): ? array
58 58
     {
59 59
         return $this->params;
60 60
     }
Please login to merge, or discard this patch.
Source/QueryException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.
Source/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.
Source/ConnectionNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.
Source/Rorm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.
Source/Helper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
         if ($this->isMySQL($dbh)) {
54 54
             // mysql mode
55 55
             return function ($identifier) {
56
-                return '`' . str_replace('`', '``', $identifier) . '`';
56
+                return '`'.str_replace('`', '``', $identifier).'`';
57 57
             };
58 58
         }
59 59
 
60 60
         // standard sql mode
61 61
         return function ($identifier) {
62
-            return '"' . str_replace('"', '""', $identifier) . '"';
62
+            return '"'.str_replace('"', '""', $identifier).'"';
63 63
         };
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
Source/ConnectionResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 /**
3 3
  * @author Rémy M. Böhler <[email protected]>
4 4
  */
5
-declare(strict_types=1);
5
+declare(strict_types = 1);
6 6
 
7 7
 namespace Rorm;
8 8
 
Please login to merge, or discard this patch.