Passed
Push — master ( b176c5...1503d9 )
by Darío
01:55
created
src/Db/Driver/AbstractDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -298,8 +298,8 @@
 block discarded – undo
298 298
     {
299 299
         foreach ($options as $option => $value)
300 300
         {
301
-            if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set'.$option))
302
-                $this->{'set'.$option}($value);
301
+            if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set' . $option))
302
+                $this->{'set' . $option}($value);
303 303
         }
304 304
     }
305 305
 
Please login to merge, or discard this patch.
src/Network/Socket/AbstractSocket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,8 @@
 block discarded – undo
108 108
     {
109 109
         foreach ($options as $option => $value)
110 110
         {
111
-            if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set'.$option))
112
-            $this->{'set'.$option}($value);
111
+            if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set' . $option))
112
+            $this->{'set' . $option}($value);
113 113
         }
114 114
 
115 115
         if (!($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP)))
Please login to merge, or discard this patch.
src/Db/Driver/Oracle.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
             ? $this->dbname
60 60
             :
61 61
                 (!is_null($this->dbport) && !empty($this->dbport))
62
-                    ? $this->dbhost .":". $this->dbport ."/". $this->dbname
63
-                    : $this->dbhost ."/". $this->dbname;
62
+                    ? $this->dbhost . ":" . $this->dbport . "/" . $this->dbname
63
+                    : $this->dbhost . "/" . $this->dbname;
64 64
 
65
-        $conn = @oci_connect($this->dbuser,  $this->dbpass, $connection_string, $this->dbchar);
65
+        $conn = @oci_connect($this->dbuser, $this->dbpass, $connection_string, $this->dbchar);
66 66
 
67 67
         if ($conn === false)
68 68
         {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $prev_error_handler = set_error_handler(['\Drone\Error\ErrorHandler', 'errorControlOperator'], E_ALL);
132 132
 
133 133
         // may be throw a Fatal error (Ex: Maximum execution time)
134
-        $r = ($this->transac_mode) ? oci_execute($stid, OCI_NO_AUTO_COMMIT) : oci_execute($stid,  OCI_COMMIT_ON_SUCCESS);
134
+        $r = ($this->transac_mode) ? oci_execute($stid, OCI_NO_AUTO_COMMIT) : oci_execute($stid, OCI_COMMIT_ON_SUCCESS);
135 135
 
136 136
         set_error_handler($prev_error_handler);
137 137
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $this->numFields = oci_num_fields($stid);
153 153
 
154 154
         if ($this->transac_mode)
155
-            $this->transac_result = is_null($this->transac_result) ? $stid: $this->transac_result && $stid;
155
+            $this->transac_result = is_null($this->transac_result) ? $stid : $this->transac_result && $stid;
156 156
 
157 157
         $this->result = $stid;
158 158
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
         if ($this->result)
199 199
         {
200
-            while ( ($row = @oci_fetch_array($this->result, OCI_BOTH + OCI_RETURN_NULLS)) !== false )
200
+            while (($row = @oci_fetch_array($this->result, OCI_BOTH + OCI_RETURN_NULLS)) !== false)
201 201
             {
202 202
                 $data[] = $row;
203 203
             }
Please login to merge, or discard this patch.
src/Db/Driver/SQLServer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         else
133 133
         {
134 134
             if ($isSelectStm)
135
-                $exec = $this->result = sqlsrv_query($this->dbconn, $sql, $params, array( "Scrollable" => SQLSRV_CURSOR_KEYSET ));
135
+                $exec = $this->result = sqlsrv_query($this->dbconn, $sql, $params, array("Scrollable" => SQLSRV_CURSOR_KEYSET));
136 136
             else
137 137
                 $exec = $this->result = sqlsrv_query($this->dbconn, $sql, $params);
138 138
         }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             $this->rowsAffected = sqlsrv_rows_affected($this->result);
159 159
 
160 160
         if ($this->transac_mode)
161
-            $this->transac_result = is_null($this->transac_result) ? $this->result: $this->transac_result && $this->result;
161
+            $this->transac_result = is_null($this->transac_result) ? $this->result : $this->transac_result && $this->result;
162 162
 
163 163
         return $this->result;
164 164
     }
Please login to merge, or discard this patch.
test/Db/Driver/MySQLTest.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function testCannotStablishConnection()
146 146
     {
147 147
         $options = $this->options;
148
-        $options["dbhost"] = 'myserver';   // this server does not exists
148
+        $options["dbhost"] = 'myserver'; // this server does not exists
149 149
 
150 150
         $conn = new MySQL($options);
151 151
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $this->assertEquals(2, $conn->getNumFields());
273 273
         $this->assertEquals(0, $conn->getRowsAffected());
274 274
 
275
-        $rowset = $conn->getArrayResult();    # array with results
275
+        $rowset = $conn->getArrayResult(); # array with results
276 276
         $row = array_shift($rowset);
277 277
 
278 278
         $this->assertArrayHasKey("ID", $row);
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
         $result = $conn->execute($sql);
300 300
         $rowcount = count($conn->getArrayResult());
301 301
 
302
-        $this->assertTrue(($rowcount === 1));    # the row is available for now
302
+        $this->assertTrue(($rowcount === 1)); # the row is available for now
303 303
 
304 304
         # properties modified by execute() method
305 305
         $this->assertEquals(1, $conn->getNumRows());
306 306
         $this->assertEquals(2, $conn->getNumFields());
307
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
307
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
308 308
 
309 309
         $this->assertTrue($conn->commit());
310 310
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $result = $conn->execute($sql);
314 314
         $rowcount = count($conn->getArrayResult());
315 315
 
316
-        $this->assertTrue(($rowcount === 1));    # the row is available
316
+        $this->assertTrue(($rowcount === 1)); # the row is available
317 317
     }
318 318
 
319 319
     /**
@@ -336,12 +336,12 @@  discard block
 block discarded – undo
336 336
         $result = $conn->execute($sql);
337 337
         $rowcount = count($conn->getArrayResult());
338 338
 
339
-        $this->assertTrue(($rowcount === 1));    # the row is available for now
339
+        $this->assertTrue(($rowcount === 1)); # the row is available for now
340 340
 
341 341
         # properties modified by execute() method
342 342
         $this->assertEquals(1, $conn->getNumRows());
343 343
         $this->assertEquals(2, $conn->getNumFields());
344
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
344
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
345 345
 
346 346
         $this->assertTrue($conn->rollback());
347 347
 
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         $result = $conn->execute($sql);
351 351
         $rowcount = count($conn->getArrayResult());
352 352
 
353
-        $this->assertNotTrue(($rowcount === 1));    # the row is not available
353
+        $this->assertNotTrue(($rowcount === 1)); # the row is not available
354 354
     }
355 355
 
356 356
     /**
@@ -382,12 +382,12 @@  discard block
 block discarded – undo
382 382
         $result = $conn->execute($sql);
383 383
         $rowcount = count($conn->getArrayResult());
384 384
 
385
-        $this->assertTrue(($rowcount === 4));    # the rows are available for now
385
+        $this->assertTrue(($rowcount === 4)); # the rows are available for now
386 386
 
387 387
         # properties modified by execute() method
388 388
         $this->assertEquals(4, $conn->getNumRows());
389 389
         $this->assertEquals(2, $conn->getNumFields());
390
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
390
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
391 391
 
392 392
         $this->assertTrue($conn->commit());
393 393
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $result = $conn->execute($sql);
397 397
         $rowcount = count($conn->getArrayResult());
398 398
 
399
-        $this->assertTrue(($rowcount === 4));    # the row is available
399
+        $this->assertTrue(($rowcount === 4)); # the row is available
400 400
     }
401 401
 
402 402
     /**
@@ -428,12 +428,12 @@  discard block
 block discarded – undo
428 428
         $result = $conn->execute($sql);
429 429
         $rowcount = count($conn->getArrayResult());
430 430
 
431
-        $this->assertTrue(($rowcount === 4));    # the rows are available for now
431
+        $this->assertTrue(($rowcount === 4)); # the rows are available for now
432 432
 
433 433
         # properties modified by execute() method
434 434
         $this->assertEquals(4, $conn->getNumRows());
435 435
         $this->assertEquals(2, $conn->getNumFields());
436
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
436
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
437 437
 
438 438
         $this->assertTrue($conn->rollback());
439 439
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         $result = $conn->execute($sql);
443 443
         $rowcount = count($conn->getArrayResult());
444 444
 
445
-        $this->assertNotTrue(($rowcount === 4));    # the row is available
445
+        $this->assertNotTrue(($rowcount === 4)); # the row is available
446 446
     }
447 447
 
448 448
     /**
@@ -473,12 +473,12 @@  discard block
 block discarded – undo
473 473
         $result = $conn->execute($sql);
474 474
         $rowcount = count($conn->getArrayResult());
475 475
 
476
-        $this->assertTrue(($rowcount === 2));    # the rows are available for now
476
+        $this->assertTrue(($rowcount === 2)); # the rows are available for now
477 477
 
478 478
         # properties modified by execute() method
479 479
         $this->assertEquals(2, $conn->getNumRows());
480 480
         $this->assertEquals(2, $conn->getNumFields());
481
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
481
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
482 482
 
483 483
         # ends the transaction
484 484
         $conn->endTransaction();
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
         $result = $conn->execute($sql);
489 489
         $rowcount = count($conn->getArrayResult());
490 490
 
491
-        $this->assertTrue(($rowcount === 2));    # the row is available
491
+        $this->assertTrue(($rowcount === 2)); # the row is available
492 492
     }
493 493
 
494 494
     /**
@@ -532,6 +532,6 @@  discard block
 block discarded – undo
532 532
         $result = $conn->execute($sql);
533 533
         $rowcount = count($conn->getArrayResult());
534 534
 
535
-        $this->assertNotTrue(($rowcount === 0));    # the rows are not available
535
+        $this->assertNotTrue(($rowcount === 0)); # the rows are not available
536 536
     }
537 537
 }
538 538
\ No newline at end of file
Please login to merge, or discard this patch.
src/Db/Driver/MySQL.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             {
119 119
                 if (is_string($param_values[$i]))
120 120
                     $bind_types .= 's';
121
-                else if(is_float($param_values[$i]))
121
+                else if (is_float($param_values[$i]))
122 122
                     $bind_types .= 'd';
123 123
                 # [POSSIBLE BUG] - To Future revision (What about non-string and non-decimal types ?)
124 124
                 else
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $this->numFields = $this->dbconn->field_count;
179 179
 
180 180
         if ($this->transac_mode)
181
-            $this->transac_result = is_null($this->transac_result) ? $this->result: $this->transac_result && $this->result;
181
+            $this->transac_result = is_null($this->transac_result) ? $this->result : $this->transac_result && $this->result;
182 182
 
183 183
         /*
184 184
          * Because mysqli_query() returns FALSE on failure, a mysqli_result object for SELECT, SHOW, DESCRIBE or EXPLAIN queries,
Please login to merge, or discard this patch.
src/FileSystem/Shell.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -95,19 +95,19 @@  discard block
 block discarded – undo
95 95
             {
96 96
                 foreach ($contents as $i)
97 97
                 {
98
-                    if (is_file($directory.'/'.$i))
98
+                    if (is_file($directory . '/' . $i))
99 99
                     {
100
-                        $allContents[] = ($showParentPath) ? $directory.'/'.$i : $i;
100
+                        $allContents[] = ($showParentPath) ? $directory . '/' . $i : $i;
101 101
 
102
-                        $this->buffer = $directory.'/'.$i;
102
+                        $this->buffer = $directory . '/' . $i;
103 103
                         call_user_func($fileCallback, $this);
104 104
                     }
105
-                    else if (is_dir($directory.'/'.$i))
105
+                    else if (is_dir($directory . '/' . $i))
106 106
                     {
107
-                        $allContents[] = ($showParentPath) ? $directory.'/'.$i : $i;
108
-                        $allContents[] = $this->getContents($directory.'/'.$i, $fileCallback, $dirCallback, null, false);
107
+                        $allContents[] = ($showParentPath) ? $directory . '/' . $i : $i;
108
+                        $allContents[] = $this->getContents($directory . '/' . $i, $fileCallback, $dirCallback, null, false);
109 109
 
110
-                        $this->buffer = $directory.'/'.$i;
110
+                        $this->buffer = $directory . '/' . $i;
111 111
                         call_user_func($dirCallback, $this);
112 112
                     }
113 113
                 }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                 if (!empty($path))
203 203
                     if (!strlen(stristr($item, $path)) > 0)
204 204
                         continue;
205
-                if (strstr($item,'~') === false && $item != '.' && $item != '..')
205
+                if (strstr($item, '~') === false && $item != '.' && $item != '..')
206 206
                     $filesToReturn[] = $item;
207 207
             }
208 208
         }
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
                     {
340 340
                         foreach ($files["folders"] as $folder)
341 341
                         {
342
-                            if (!file_exists($dest.'/'.$folder))
342
+                            if (!file_exists($dest . '/' . $folder))
343 343
                                 mkdir("$dest/$folder", 0777, true);
344 344
                         }
345 345
                     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                         foreach ($files["files"] as $item)
350 350
                         {
351 351
                             if (!file_exists("$dest/$files"))
352
-                                copy($item, $dest.'/'.$item);
352
+                                copy($item, $dest . '/' . $item);
353 353
                         }
354 354
                     }
355 355
                 }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
         if (is_dir($dest))
360 360
         {
361 361
             if (!$recursive)
362
-                copy($file, $dest.'/'.$file);
362
+                copy($file, $dest . '/' . $file);
363 363
             else {
364 364
 
365 365
                 $files = array();
@@ -378,14 +378,14 @@  discard block
 block discarded – undo
378 378
 
379 379
                     foreach ($files[1] as $item)
380 380
                     {
381
-                        if (!file_exists($dest.'/'.$item))
381
+                        if (!file_exists($dest . '/' . $item))
382 382
                             mkdir("$dest/$item", 0777, true);
383 383
                     }
384 384
 
385 385
                     foreach ($files[0] as $item)
386 386
                     {
387 387
                         if (!file_exists("$dest/$files"))
388
-                            copy($item, $dest.'/'.$item);
388
+                            copy($item, $dest . '/' . $item);
389 389
                     }
390 390
                 });
391 391
             }
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
             throw new \InvalidArgumentException("Missing first parameter");
411 411
 
412 412
         if (is_dir($newfile))
413
-                $newfile .= '/'.basename($oldfile);
413
+                $newfile .= '/' . basename($oldfile);
414 414
 
415 415
         if ($oldfile == $newfile)
416 416
             throw new \Exception("'$oldfile' and '$newfile' are the same file");
417 417
 
418
-        if(!rename($oldfile, $newfile))
418
+        if (!rename($oldfile, $newfile))
419 419
             return false;
420 420
 
421 421
         return true;
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         else {
446 446
             if (!is_dir($dir))
447 447
             {
448
-                if(!mkdir("$dir", 0777))
448
+                if (!mkdir("$dir", 0777))
449 449
                     return false;
450 450
             }
451 451
         }
Please login to merge, or discard this patch.