Passed
Push — master ( 1255dc...799d2c )
by Darío
02:00
created
src/Network/Socket/Server.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     public function listen(Array $eventHandlers = array())
75 75
     {
76 76
         $event = $eventHandlers;
77
-        $clousure = function(){};
77
+        $clousure = function() {};
78 78
 
79 79
         if (!array_key_exists('success', $event))
80 80
             $event["success"] = $clousure;
Please login to merge, or discard this patch.
src/Util/DateTime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 break;
95 95
 
96 96
             case self::LAST_YEAR:
97
-                $year = ((int) date('Y'))- 1;
97
+                $year = ((int) date('Y')) - 1;
98 98
                 break;
99 99
 
100 100
             default:
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 $d->setDate($year, (int) $d->format('m'), (int) $d->format('d'));
143 143
             }
144 144
 
145
-            $d->add(new \DateInterval('P'.($day - 1).'D'));
145
+            $d->add(new \DateInterval('P' . ($day - 1) . 'D'));
146 146
         }
147 147
 
148 148
         return $d;
Please login to merge, or discard this patch.
test/Error/ErrorTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
     public function getContentsFromUrl($filename)
127 127
     {
128 128
         $headers = get_headers($url);
129
-        $exists = stripos($headers[0],"200 OK") ? true : false;
129
+        $exists = stripos($headers[0], "200 OK") ? true : false;
130 130
 
131 131
         if ($exists)
132 132
             return file_get_contents($filename);
Please login to merge, or discard this patch.
test/Db/TableGateway/TableGatewayTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function testCannotStablishConnectionWhenExists()
69 69
     {
70 70
         $options = $this->options;
71
-        $options["dbhost"] = 'myserver';   // this server does not exists
71
+        $options["dbhost"] = 'myserver'; // this server does not exists
72 72
 
73 73
         $errorObject = null;
74 74
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function testCannotStablishConnection()
99 99
     {
100 100
         $options = $this->options;
101
-        $options["dbhost"] = 'myserver';   // this server does not exists
101
+        $options["dbhost"] = 'myserver'; // this server does not exists
102 102
 
103 103
         $entity = new MyEntity();
104 104
         $gateway = new TableGateway($entity, ["other" => $options]);
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
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $this->assertEquals(2, $conn->getNumFields());
275 275
         $this->assertEquals(0, $conn->getRowsAffected());
276 276
 
277
-        $rowset = $conn->getArrayResult();    # array with results
277
+        $rowset = $conn->getArrayResult(); # array with results
278 278
         $row = array_shift($rowset);
279 279
 
280 280
         $this->assertArrayHasKey("ID", $row);
@@ -301,12 +301,12 @@  discard block
 block discarded – undo
301 301
         $conn->execute($sql);
302 302
         $rowcount = count($conn->getArrayResult());
303 303
 
304
-        $this->assertTrue(($rowcount === 1));    # the row is available for now
304
+        $this->assertTrue(($rowcount === 1)); # the row is available for now
305 305
 
306 306
         # properties modified by execute() method
307 307
         $this->assertEquals(1, $conn->getNumRows());
308 308
         $this->assertEquals(2, $conn->getNumFields());
309
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
309
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
310 310
 
311 311
         $this->assertTrue($conn->commit());
312 312
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         $conn->execute($sql);
316 316
         $rowcount = count($conn->getArrayResult());
317 317
 
318
-        $this->assertTrue(($rowcount === 1));    # the row is available
318
+        $this->assertTrue(($rowcount === 1)); # the row is available
319 319
     }
320 320
 
321 321
     /**
@@ -338,12 +338,12 @@  discard block
 block discarded – undo
338 338
         $conn->execute($sql);
339 339
         $rowcount = count($conn->getArrayResult());
340 340
 
341
-        $this->assertTrue(($rowcount === 1));    # the row is available for now
341
+        $this->assertTrue(($rowcount === 1)); # the row is available for now
342 342
 
343 343
         # properties modified by execute() method
344 344
         $this->assertEquals(1, $conn->getNumRows());
345 345
         $this->assertEquals(2, $conn->getNumFields());
346
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
346
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
347 347
 
348 348
         $this->assertTrue($conn->rollback());
349 349
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         $conn->execute($sql);
353 353
         $rowcount = count($conn->getArrayResult());
354 354
 
355
-        $this->assertNotTrue(($rowcount === 1));    # the row is not available
355
+        $this->assertNotTrue(($rowcount === 1)); # the row is not available
356 356
     }
357 357
 
358 358
     /**
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
         $conn->execute($sql);
385 385
         $rowcount = count($conn->getArrayResult());
386 386
 
387
-        $this->assertTrue(($rowcount === 4));    # the rows are available for now
387
+        $this->assertTrue(($rowcount === 4)); # the rows are available for now
388 388
 
389 389
         # properties modified by execute() method
390 390
         $this->assertEquals(4, $conn->getNumRows());
391 391
         $this->assertEquals(2, $conn->getNumFields());
392
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
392
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
393 393
 
394 394
         $this->assertTrue($conn->commit());
395 395
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         $conn->execute($sql);
399 399
         $rowcount = count($conn->getArrayResult());
400 400
 
401
-        $this->assertTrue(($rowcount === 4));    # the rows are available
401
+        $this->assertTrue(($rowcount === 4)); # the rows are available
402 402
     }
403 403
 
404 404
     /**
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
         $conn->execute($sql);
431 431
         $rowcount = count($conn->getArrayResult());
432 432
 
433
-        $this->assertTrue(($rowcount === 4));    # the rows are available for now
433
+        $this->assertTrue(($rowcount === 4)); # the rows are available for now
434 434
 
435 435
         # properties modified by execute() method
436 436
         $this->assertEquals(4, $conn->getNumRows());
437 437
         $this->assertEquals(2, $conn->getNumFields());
438
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
438
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
439 439
 
440 440
         $this->assertTrue($conn->rollback());
441 441
 
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
         $conn->execute($sql);
445 445
         $rowcount = count($conn->getArrayResult());
446 446
 
447
-        $this->assertNotTrue(($rowcount === 4));    # the rows are not available
447
+        $this->assertNotTrue(($rowcount === 4)); # the rows are not available
448 448
     }
449 449
 
450 450
     /**
@@ -475,12 +475,12 @@  discard block
 block discarded – undo
475 475
         $conn->execute($sql);
476 476
         $rowcount = count($conn->getArrayResult());
477 477
 
478
-        $this->assertTrue(($rowcount === 2));    # the rows are available for now
478
+        $this->assertTrue(($rowcount === 2)); # the rows are available for now
479 479
 
480 480
         # properties modified by execute() method
481 481
         $this->assertEquals(2, $conn->getNumRows());
482 482
         $this->assertEquals(2, $conn->getNumFields());
483
-        $this->assertEquals(0, $conn->getRowsAffected());    # nothing affected (autocommit = false)
483
+        $this->assertEquals(0, $conn->getRowsAffected()); # nothing affected (autocommit = false)
484 484
 
485 485
         # ends the transaction
486 486
         $conn->endTransaction();
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
         $conn->execute($sql);
491 491
         $rowcount = count($conn->getArrayResult());
492 492
 
493
-        $this->assertTrue(($rowcount === 2));    # the row is available
493
+        $this->assertTrue(($rowcount === 2)); # the row is available
494 494
     }
495 495
 
496 496
     /**
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         $conn->execute($sql);
535 535
         $rowcount = count($conn->getArrayResult());
536 536
 
537
-        $this->assertNotTrue(($rowcount === 0));    # the rows are not available
537
+        $this->assertNotTrue(($rowcount === 0)); # the rows are not available
538 538
 
539 539
         # remove all work
540 540
         $conn->execute("DROP TABLE MYTABLE");
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
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             {
121 121
                 if (is_string($param_values[$i]))
122 122
                     $bind_types .= 's';
123
-                else if(is_float($param_values[$i]))
123
+                else if (is_float($param_values[$i]))
124 124
                     $bind_types .= 'd';
125 125
                 # [POSSIBLE BUG] - To Future revision (What about non-string and non-decimal types ?)
126 126
                 else
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $this->numFields = $this->dbconn->field_count;
185 185
 
186 186
         if ($this->transac_mode)
187
-            $this->transac_result = is_null($this->transac_result) ? $this->result: $this->transac_result && $this->result;
187
+            $this->transac_result = is_null($this->transac_result) ? $this->result : $this->transac_result && $this->result;
188 188
         /*
189 189
          * Because mysqli_query() returns FALSE on failure, a mysqli_result object for SELECT, SHOW, DESCRIBE or EXPLAIN queries,
190 190
          * and TRUE for other successful queries, it should be handled to return only objects or resources.
Please login to merge, or discard this patch.
src/Dom/Element/AbstractElement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -258,12 +258,12 @@
 block discarded – undo
258 258
     {
259 259
         if (static::HAS_END_TAG)
260 260
         {
261
-            $this->startTag = "<" .strtolower(static::NODE_NAME). ">";
262
-            $this->endTag   = "</" .strtolower(static::NODE_NAME). ">";
261
+            $this->startTag = "<" . strtolower(static::NODE_NAME) . ">";
262
+            $this->endTag   = "</" . strtolower(static::NODE_NAME) . ">";
263 263
         }
264 264
         else
265 265
         {
266
-            $this->startTag = "<" .strtolower(static::NODE_NAME);
266
+            $this->startTag = "<" . strtolower(static::NODE_NAME);
267 267
             $this->endTag   = "/>";
268 268
         }
269 269
     }
Please login to merge, or discard this patch.
test/Validator/FormValidatorTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         ]);
48 48
 
49 49
         $form->fill([
50
-            "username" => 'jobs',       # wrong because of minlength attr
50
+            "username" => 'jobs', # wrong because of minlength attr
51 51
             "password" => 'jVi7Qp4X',
52 52
             "email"    => 'j@'          # wrong because of type and minlength attr
53 53
         ]);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         ]);
199 199
 
200 200
         $form->fill([
201
-            "username" => 'jobs',       # wrong because of minlength attr
201
+            "username" => 'jobs', # wrong because of minlength attr
202 202
         ]);
203 203
 
204 204
         $validator = new FormValidator($form, 'en');
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
         $form->fill([
244 244
             "product" => [
245 245
                 "optical mouse",
246
-                "-",                # wrong name
246
+                "-", # wrong name
247 247
                 "78"                # another wrong name
248 248
             ],
249 249
             "price" => [
250 250
                 10,
251
-                0,   # wrong price
251
+                0, # wrong price
252 252
                 0    # another wrong price
253 253
             ]
254 254
         ]);
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         ]);
306 306
 
307 307
         $form->fill([
308
-            "username" => 'steave jobs',       # wrong because of minlength attr
308
+            "username" => 'steave jobs', # wrong because of minlength attr
309 309
             "password" => 'jVi7Qp4X',
310 310
             "type"     => 'moderator'          # wrong because moderator is not a valid needle
311 311
         ]);
Please login to merge, or discard this patch.
src/Validator/FormValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@
 block discarded – undo
304 304
             {
305 305
                 foreach ($validator->getMessages() as $message)
306 306
                 {
307
-                    $this->error($label ."-~-". (count($this->getErrors()) + 1), $message);
307
+                    $this->error($label . "-~-" . (count($this->getErrors()) + 1), $message);
308 308
                 }
309 309
             }
310 310
         }
Please login to merge, or discard this patch.