Passed
Push — master ( 1638bc...46c53c )
by Agel_Nash
02:33
created
src/LegacyDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function replaceFullTableName($tableName, $force = false)
54 54
     {
55 55
         $tableName = trim($tableName);
56
-        if ((bool)$force === true) {
56
+        if ((bool) $force === true) {
57 57
             $result = $this->getFullTableName($tableName);
58 58
         } elseif (strpos($tableName, '[+prefix+]') !== false) {
59 59
             $dbase = trim($this->getConfig('database'), '`');
Please login to merge, or discard this patch.
src/Exceptions/QueryException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function __construct($message = '', $code = 0, Throwable $previous = null)
15 15
     {
16
-        parent::__construct($message, (int)$code, $previous);
16
+        parent::__construct($message, (int) $code, $previous);
17 17
 
18 18
         $this->code = $code;
19 19
     }
Please login to merge, or discard this patch.
src/Traits/DebugTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function setLastQuery($query)
138 138
     {
139
-        $this->lastQuery = (string)$query;
139
+        $this->lastQuery = (string) $query;
140 140
 
141 141
         return $query;
142 142
     }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function getLastQuery()
148 148
     {
149
-        return (string)$this->lastQuery;
149
+        return (string) $this->lastQuery;
150 150
     }
151 151
 
152 152
     /**
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
             $out .= '<fieldset style="text-align:left">';
273 273
             $out .= '<legend>Query ' . $i . ' - ' . sprintf($this->timeFormat, $query['time']) . '</legend>';
274 274
             $out .= $query['sql'] . '<br><br>';
275
-            if (! empty($query['element'])) {
275
+            if (!empty($query['element'])) {
276 276
                 $out .= $query['element']['type'] . '  => ' . $query['element']['name'] . '<br>';
277 277
             }
278
-            if (! empty($query['event'])) {
278
+            if (!empty($query['event'])) {
279 279
                 $out .= 'Current Event  => ' . $query['event'] . '<br>';
280 280
             }
281 281
             $out .= 'Affected Rows => ' . $query['rows'] . '<br>';
282
-            if (! empty($query['path'])) {
282
+            if (!empty($query['path'])) {
283 283
                 $out .= 'Functions Path => ' . $query['path'] . '<br>';
284 284
             }
285 285
             /*$out .= 'Functions Path => ' . $query['path']['method'] . '<br>';
Please login to merge, or discard this patch.
src/Drivers/MySqliDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function getConnect()
30 30
     {
31
-        if (! $this->isConnected()) {
31
+        if (!$this->isConnected()) {
32 32
             return $this->connect();
33 33
         }
34 34
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function getLastErrorNo()
58 58
     {
59
-        $out = (string)$this->getConnect()->sqlstate;
59
+        $out = (string) $this->getConnect()->sqlstate;
60 60
 
61 61
         if ($out === '00000') {
62 62
             $out = '';
Please login to merge, or discard this patch.
src/AbstractDatabase.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function getLastErrorNo()
31 31
     {
32
-        return (string)$this->getDriver()->getLastErrorNo();
32
+        return (string) $this->getDriver()->getLastErrorNo();
33 33
     }
34 34
 
35 35
     /**
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     public function getTableMetaData($table)
264 264
     {
265 265
         $metadata = [];
266
-        if (! empty($table)) {
266
+        if (!empty($table)) {
267 267
             $sql = 'SHOW FIELDS FROM ' . $table;
268 268
             $result = $this->query($sql);
269 269
             $metadata = $this->getDriver()->getTableMetaData($result);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function setDriver($driver)
287 287
     {
288
-        if (! \in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) {
288
+        if (!\in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) {
289 289
             throw new Exceptions\DriverException(
290 290
                 $driver . ' should implements the ' . Interfaces\DriverInterface::class
291 291
             );
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             $table = $this->prepareFrom($table);
379 379
             $useFields = \is_array($fields) ? $this->prepareValues($fields) : $fields;
380 380
 
381
-            if (empty($useFields) || ! \is_scalar($useFields) || $useFields === '*') {
381
+            if (empty($useFields) || !\is_scalar($useFields) || $useFields === '*') {
382 382
                 throw (new Exceptions\InvalidFieldException('Invalid insert fields'))
383 383
                     ->setData($fields);
384 384
             }
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         $lid = null;
419 419
         $useFields = \is_array($fields) ? $this->prepareFields($fields, true) : $fields;
420 420
 
421
-        if (empty($useFields) || ! \is_scalar($useFields) || $useFields === '*') {
421
+        if (empty($useFields) || !\is_scalar($useFields) || $useFields === '*') {
422 422
             throw (new Exceptions\InvalidFieldException('Invalid insert fields'))
423 423
                 ->setData($fields);
424 424
         }
Please login to merge, or discard this patch.
src/Drivers/IlluminateDriver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function getConnect()
96 96
     {
97
-        if (! $this->isConnected()) {
97
+        if (!$this->isConnected()) {
98 98
             $this->connect();
99
-            if (! $this->conn->getPdo() instanceof PDO) {
99
+            if (!$this->conn->getPdo() instanceof PDO) {
100 100
                 $this->conn->reconnect();
101 101
             }
102 102
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function connect()
139 139
     {
140 140
         try {
141
-            if (! $this->hasConnectionName($this->connection)) {
141
+            if (!$this->hasConnectionName($this->connection)) {
142 142
                 $this->getCapsule()->addConnection([
143 143
                     'driver'    => $this->driver,
144 144
                     'host'      => $this->getConfig('host'),
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         $query = $method . ' ' . $charset;
216 216
 
217
-        return (bool)$this->query($query);
217
+        return (bool) $this->query($query);
218 218
     }
219 219
 
220 220
     /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             $result = $this->prepare($sql);
250 250
             $this->execute($result);
251 251
 
252
-            if ($this->saveAffectedRows($result) === 0 && $this->isResult($result) && ! $this->isSelectQuery($sql)) {
252
+            if ($this->saveAffectedRows($result) === 0 && $this->isResult($result) && !$this->isSelectQuery($sql)) {
253 253
                 $result = true;
254 254
             }
255 255
         } catch (\Exception $exception) {
Please login to merge, or discard this patch.
src/Traits/SupportTrait.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
     protected function convertValue($value)
12 12
     {
13 13
         switch (true) {
14
-            case (\is_numeric($value) && ! \is_float(1 * $value)):
15
-                $value = (int)$value;
14
+            case (\is_numeric($value) && !\is_float(1 * $value)):
15
+                $value = (int) $value;
16 16
                 break;
17
-            case \is_numeric($value) && \is_float(1*$value):
18
-                $value = (float)$value;
17
+            case \is_numeric($value) && \is_float(1 * $value):
18
+                $value = (float) $value;
19 19
                 break;
20 20
             default:
21 21
                 break;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function convertDate($timestamp, $fieldType = 'DATETIME')
34 34
     {
35 35
         $date = false;
36
-        if (! empty($timestamp) && $timestamp > 0) {
36
+        if (!empty($timestamp) && $timestamp > 0) {
37 37
             $format = [
38 38
                 'DATE' => 'Y-m-d',
39 39
                 'TIME' => 'H:i:s',
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if (\is_array($data)) {
58 58
             $tmp = [];
59 59
             foreach ($data as $alias => $field) {
60
-                $tmp[] = ($alias !== $field && ! \is_int($alias) && $ignoreAlias === false) ?
60
+                $tmp[] = ($alias !== $field && !\is_int($alias) && $ignoreAlias === false) ?
61 61
                     ($field . ' as `' . $alias . '`') : $field;
62 62
             }
63 63
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             }
135 135
         }
136 136
 
137
-        if (! \is_scalar($values)) {
137
+        if (!\is_scalar($values)) {
138 138
             throw (new Exceptions\InvalidFieldException('values'))
139 139
                 ->setData($values);
140 140
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $onlyNumbers = true;
180 180
         foreach ($data as $value) {
181
-            if (! \is_numeric($value)) {
181
+            if (!\is_numeric($value)) {
182 182
                 $onlyNumbers = false;
183 183
                 break;
184 184
             }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             }
223 223
             $data = implode(' ', $tmp);
224 224
         }
225
-        if (! is_scalar($data) || empty($data)) {
225
+        if (!is_scalar($data) || empty($data)) {
226 226
             throw new Exceptions\TableNotDefinedException($data);
227 227
         }
228 228
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
             }
246 246
         }
247 247
         $data = trim($data);
248
-        if (! empty($data) && stripos($data, 'WHERE') !== 0) {
248
+        if (!empty($data) && stripos($data, 'WHERE') !== 0) {
249 249
             $data = "WHERE {$data}";
250 250
         }
251 251
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     protected function prepareOrder($data)
260 260
     {
261 261
         $data = trim($data);
262
-        if (! empty($data) && stripos($data, 'ORDER') !== 0) {
262
+        if (!empty($data) && stripos($data, 'ORDER') !== 0) {
263 263
             $data = "ORDER BY {$data}";
264 264
         }
265 265
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     protected function prepareLimit($data)
274 274
     {
275 275
         $data = trim($data);
276
-        if (! empty($data) && stripos($data, 'LIMIT') !== 0) {
276
+        if (!empty($data) && stripos($data, 'LIMIT') !== 0) {
277 277
             $data = "LIMIT {$data}";
278 278
         }
279 279
 
Please login to merge, or discard this patch.