Passed
Push — master ( a365bf...864cd3 )
by Darío
01:42
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/FileSystem/Shell.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -93,24 +93,24 @@  discard block
 block discarded – undo
93 93
             {
94 94
                 foreach ($contents as $i)
95 95
                 {
96
-                    if (is_file($handler.'/'.$i))
96
+                    if (is_file($handler . '/' . $i))
97 97
                     {
98
-                        $allContents[] = $handler.'/'.$i;
98
+                        $allContents[] = $handler . '/' . $i;
99 99
 
100
-                        $this->buffer = $handler.'/'.$i;
100
+                        $this->buffer = $handler . '/' . $i;
101 101
                         call_user_func($fileCallback, $this);
102 102
                     }
103
-                    elseif (is_dir($handler.'/'.$i))
103
+                    elseif (is_dir($handler . '/' . $i))
104 104
                     {
105
-                        $allContents[] = $handler.'/'.$i;
105
+                        $allContents[] = $handler . '/' . $i;
106 106
 
107
-                        $this->buffer = $handler.'/'.$i;
108
-                        $this->getContents($handler.'/'.$i, $fileCallback, $dirCallback);
107
+                        $this->buffer = $handler . '/' . $i;
108
+                        $this->getContents($handler . '/' . $i, $fileCallback, $dirCallback);
109 109
 
110 110
                         $directory = scandir($handler);
111 111
 
112 112
                         if (!count($directory) < 3)
113
-                            $this->buffer = $handler.'/'.$i;
113
+                            $this->buffer = $handler . '/' . $i;
114 114
 
115 115
                         call_user_func($dirCallback, $this);
116 116
                     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                 if (!empty($path))
197 197
                     if (!strlen(stristr($item, $path)) > 0)
198 198
                         continue;
199
-                if (strstr($item,'~') === false && $item != '.' && $item != '..')
199
+                if (strstr($item, '~') === false && $item != '.' && $item != '..')
200 200
                     $filesToReturn[] = $item;
201 201
             }
202 202
         }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         if (is_dir($dest))
300 300
         {
301 301
             if (!$recursive)
302
-                copy($file, $dest.'/'.$file);
302
+                copy($file, $dest . '/' . $file);
303 303
             else {
304 304
 
305 305
                 $files = array();
@@ -318,14 +318,14 @@  discard block
 block discarded – undo
318 318
 
319 319
                     foreach ($files[1] as $item)
320 320
                     {
321
-                        if (!file_exists($dest.'/'.$item))
321
+                        if (!file_exists($dest . '/' . $item))
322 322
                             mkdir("$dest/$item", 0777, true);
323 323
                     }
324 324
 
325 325
                     foreach ($files[0] as $item)
326 326
                     {
327 327
                         if (!file_exists("$dest/$files"))
328
-                            copy($item, $dest.'/'.$item);
328
+                            copy($item, $dest . '/' . $item);
329 329
                     }
330 330
                 });
331 331
             }
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
             throw new Exception("Missing parameter for mv!");
351 351
 
352 352
         if (is_dir($newfile))
353
-                $newfile .= '/'.basename($oldfile);
353
+                $newfile .= '/' . basename($oldfile);
354 354
 
355 355
         if ($oldfile == $newfile)
356 356
             throw new Exception("'$oldfile' and '$newfile' are the same file");
357 357
 
358
-        if(!rename($oldfile, $newfile))
358
+        if (!rename($oldfile, $newfile))
359 359
             return false;
360 360
 
361 361
         return true;
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         else {
386 386
             if (!is_dir($dir))
387 387
             {
388
-                if(!mkdir("$dir", 0777))
388
+                if (!mkdir("$dir", 0777))
389 389
                     return false;
390 390
             }
391 391
         }
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.
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, * and TRUE for other successful queries, it should be handled to return only objects or resources.
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.