Browse Source

Style fixes

J. King 2 months ago
parent
commit
500851f161

+ 1
- 0
CHANGELOG View File

@@ -1,4 +1,5 @@
1 1
 Version 0.6.1 (2019-01-23)
2
+==========================
2 3
 
3 4
 Bug Fixes:
4 5
 - Unify SQL timeout settings

+ 1
- 1
lib/CLI.php View File

@@ -88,7 +88,7 @@ USAGE_TEXT;
88 88
 
89 89
     /** @codeCoverageIgnore */
90 90
     protected function logError(string $msg) {
91
-        fwrite(STDERR,$msg.\PHP_EOL);
91
+        fwrite(STDERR, $msg.\PHP_EOL);
92 92
     }
93 93
 
94 94
     /** @codeCoverageIgnore */

+ 2
- 2
lib/Db/MySQL/Statement.php View File

@@ -94,8 +94,8 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
94 94
     }
95 95
 
96 96
     protected function bindValue($value, string $type, int $position): bool {
97
-        // this is a bit of a hack: we collect values (and MySQL bind types) here so that we can take 
98
-        // advantage of the work done by bindValues() even though MySQL requires everything to be bound 
97
+        // this is a bit of a hack: we collect values (and MySQL bind types) here so that we can take
98
+        // advantage of the work done by bindValues() even though MySQL requires everything to be bound
99 99
         // all at once; we also segregate large values for later packetization
100 100
         if (($type === "binary" && !is_null($value)) || (is_string($value) && strlen($value) > $this->packetSize)) {
101 101
             $this->values[] = null;

+ 1
- 1
lib/Db/PostgreSQL/Statement.php View File

@@ -29,7 +29,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
29 29
     protected $bindings;
30 30
 
31 31
     public function __construct($db, string $query, array $bindings = []) {
32
-        $this->db = $db; 
32
+        $this->db = $db;
33 33
         $this->query = $query;
34 34
         $this->retypeArray($bindings);
35 35
     }

+ 1
- 1
lib/Misc/ValueInfo.php View File

@@ -352,7 +352,7 @@ class ValueInfo {
352 352
                     // input is a number, assume this is a number of seconds
353 353
                     // for legibility we convert large numbers to minutes, hours, and days as necessary
354 354
                     // the DateInterval constructor only allows 12 digits for any given part of an interval,
355
-                    // so we also convert days to 365-day years where we must, and cap the number of years 
355
+                    // so we also convert days to 365-day years where we must, and cap the number of years
356 356
                     // at (1e11 - 1); this being a very large number, the loss of precision is probably not
357 357
                     // significant in practical usage
358 358
                     $sec = abs($value);

+ 2
- 2
tests/cases/Misc/TestValueInfo.php View File

@@ -457,7 +457,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest {
457 457
             */
458 458
             /* Input value                          null         bool           int                      float                        string                          array                                            interval                   */
459 459
             [null,                                  [null,true], [false,false], [0,              false], [0.0,                false], ["",                    false], [[],                                     false], [null, false]],
460
-            ["",                                    [null,true], [false,true],  [0,              false], [0.0,                false], ["",                    true],  [[""],                                   false], [null, false]], 
460
+            ["",                                    [null,true], [false,true],  [0,              false], [0.0,                false], ["",                    true],  [[""],                                   false], [null, false]],
461 461
             [1,                                     [null,true], [true, true],  [1,              true],  [1.0,                true],  ["1",                   true],  [[1],                                    false], [$this->i("PT1S"), false]],
462 462
             [PHP_INT_MAX,                           [null,true], [true, false], [PHP_INT_MAX,    true],  [(float) PHP_INT_MAX,true],  [(string) PHP_INT_MAX,  true],  [[PHP_INT_MAX],                          false], [$this->i("P292471208677Y195DT15H30M7S"), false]],
463 463
             [1.0,                                   [null,true], [true, true],  [1,              true],  [1.0,                true],  ["1",                   true],  [[1.0],                                  false], [$this->i("PT1S"), false]],
@@ -571,7 +571,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest {
571 571
             "!M j, Y (D)",
572 572
             null,
573 573
         ];
574
-        foreach([
574
+        foreach ([
575 575
             /* Input value                          microtime                    iso8601                      iso8601m                     http                         sql                          date                         time                         unix                         float                        '!M j, Y (D)'                *strtotime* (null)                  */
576 576
             [null,                                  null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                                   ],
577 577
             [INF,                                   null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                        null,                                   ],

Loading…
Cancel
Save