Completed
Push — master ( 8a9a36...5d30b0 )
by Ondřej
03:00
created
src/Ivory/Value/Quantity.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -99,6 +99,10 @@
 block discarded – undo
99 99
         return new Quantity($val, $unit);
100 100
     }
101 101
 
102
+    /**
103
+     * @param string $value
104
+     * @param string $unit
105
+     */
102 106
     public static function fromValue($value, ?string $unit = null): Quantity
103 107
     {
104 108
         if (!is_numeric($value)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Value;
5 5
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         return new Quantity($val, $unit);
100 100
     }
101 101
 
102
-    public static function fromValue($value, ?string $unit = null): Quantity
102
+    public static function fromValue($value, ?string $unit = null) : Quantity
103 103
     {
104 104
         if (!is_numeric($value)) {
105 105
             throw new \InvalidArgumentException('$value');
Please login to merge, or discard this patch.
src/Ivory/Value/Range.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -168,6 +168,9 @@  discard block
 block discarded – undo
168 168
         return new Range($subtype, null, true, null, null, null, null);
169 169
     }
170 170
 
171
+    /**
172
+     * @param boolean $upperInc
173
+     */
171 174
     private static function processBoundSpec($boundsOrLowerInc = '[)', ?bool $upperInc = null)
172 175
     {
173 176
         if (is_string($boundsOrLowerInc)) {
@@ -194,6 +197,9 @@  discard block
 block discarded – undo
194 197
     }
195 198
 
196 199
 
200
+    /**
201
+     * @param IRangeCanonicalFunc|null $canonicalFunc
202
+     */
197 203
     private function __construct(
198 204
         ITotallyOrderedType $subtype,
199 205
         ?IRangeCanonicalFunc $canonicalFunc,
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Value;
5 5
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $upper,
108 108
         $boundsOrLowerInc = '[)',
109 109
         ?bool $upperInc = null
110
-    ): Range {
110
+    ) : Range {
111 111
         list($loInc, $upInc) = self::processBoundSpec($boundsOrLowerInc, $upperInc);
112 112
 
113 113
         if ($lower !== null && $upper !== null) {
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      * @return array|null pair of the lower and upper bound, or <tt>null</tt> if the range is empty
321 321
      * @throws UnsupportedException if the range subtype is not an {@link IDiscreteType}
322 322
      */
323
-    public function toBounds($boundsOrLowerInc, ?bool $upperInc = null): ?array
323
+    public function toBounds($boundsOrLowerInc, ?bool $upperInc = null) : ? array
324 324
     {
325 325
         if (!$this->subtype instanceof IDiscreteType) {
326 326
             throw new UnsupportedException('Range subtype is not ' . IDiscreteType::class . ', cannot convert bounds');
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      *                   an empty range is considered to be contained in any range, even an empty one;
456 456
      *                   <tt>null</tt> on <tt>null</tt> input
457 457
      */
458
-    public function containsRange(?Range $other): ?bool
458
+    public function containsRange(?Range $other) : ?bool
459 459
     {
460 460
         if ($other === null) {
461 461
             return null;
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
      *                   an empty range is considered to be contained in any range, even an empty one;
499 499
      *                   <tt>null</tt> on <tt>null</tt> input
500 500
      */
501
-    public function containedInRange(?Range $other): ?bool
501
+    public function containedInRange(?Range $other) : ?bool
502 502
     {
503 503
         if ($other === null) {
504 504
             return null;
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
      * @return bool|null whether this and the other range overlap, i.e., have a non-empty intersection;
512 512
      *                   <tt>null</tt> on <tt>null</tt> input
513 513
      */
514
-    public function overlaps(?Range $other): ?bool
514
+    public function overlaps(?Range $other) : ?bool
515 515
     {
516 516
         if ($other === null) {
517 517
             return null;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      * @return Range|null intersection of this and the other range
543 543
      *                    <tt>null</tt> on <tt>null</tt> input
544 544
      */
545
-    public function intersect(?Range $other): ?Range
545
+    public function intersect(?Range $other) : ?Range
546 546
     {
547 547
         if ($other === null) {
548 548
             return null;
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
      *                   <tt>false</tt> otherwise, especially if either range is empty;
614 614
      *                   <tt>null</tt> on <tt>null</tt> input
615 615
      */
616
-    public function strictlyLeftOf(?Range $other): ?bool
616
+    public function strictlyLeftOf(?Range $other) : ?bool
617 617
     {
618 618
         if ($other === null) {
619 619
             return null;
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
      *                   <tt>false</tt> otherwise, especially if either range is empty;;
637 637
      *                   <tt>null</tt> on <tt>null</tt> input
638 638
      */
639
-    public function strictlyRightOf(?Range $other): ?bool
639
+    public function strictlyRightOf(?Range $other) : ?bool
640 640
     {
641 641
         if ($other === null) {
642 642
             return null;
Please login to merge, or discard this patch.
src/Ivory/Value/TimestampBase.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
      * Adds a given number of seconds (1 by default) to this date/time and returns the result. Only affects finite
207 207
      * dates.
208 208
      *
209
-     * @param int|float $seconds
209
+     * @param integer $seconds
210 210
      * @return static the date <tt>$seconds</tt> seconds after (or before, if negative) this date/time
211 211
      */
212 212
     public function addSecond($seconds = 1)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Value;
5 5
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     protected static function isoStringToDateTime(
38 38
         string $isoDateTimeString,
39 39
         ?\DateTimeZone $forcedTimezone = null
40
-    ): \DateTimeImmutable {
40
+    ) : \DateTimeImmutable {
41 41
         // check out for more than 4 digits for the year - something date_create_immutable() does not handle properly
42 42
         $addYears = 0;
43 43
         $dateCreateInput = preg_replace_callback(
Please login to merge, or discard this patch.
src/Ivory/Lang/SqlPattern/SqlPattern.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\SqlPattern;
5 5
 
Please login to merge, or discard this patch.
src/Ivory/Lang/SqlPattern/SqlPatternParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\SqlPattern;
5 5
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param bool|null $quoted
98 98
      * @return string|null <tt>null</tt> iff <tt>$str</tt> is <tt>null</tt>
99 99
      */
100
-    private function unquoteString(?string $str, ?bool &$quoted = null): ?string
100
+    private function unquoteString(?string $str, ?bool &$quoted = null) : ?string
101 101
     {
102 102
         if ($str && $str[0] == '"') {
103 103
             assert($str[strlen($str) - 1] == '"');
Please login to merge, or discard this patch.
src/Ivory/Lang/SqlPattern/SqlPatternPlaceholder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\SqlPattern;
5 5
 
Please login to merge, or discard this patch.
src/Ivory/Lang/SqlPattern/CachingSqlPatternParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\SqlPattern;
5 5
 
Please login to merge, or discard this patch.
src/Ivory/Lang/Sql/Keywords.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\Sql;
5 5
 
Please login to merge, or discard this patch.
src/Ivory/Lang/Sql/Types.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Lang\Sql;
5 5
 
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 class Types
10 10
 {
11 11
     const BIGINT_MIN = '-9223372036854775808'; // NOTE: written as string not to lose precision on platforms where this
12
-    const BIGINT_MAX = '999999999999';  //       would be converted to float
12
+    const BIGINT_MAX = '999999999999'; //       would be converted to float
13 13
 
14 14
     /**
15 15
      * Lists names of types defined by SQL as reserved ones.
Please login to merge, or discard this patch.