Completed
Push — master ( 975c17...8f2777 )
by Adam
04:20 queued 01:49
created
src/ArrayVO.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
      * Iterates through an array of values and finds a key.  If it makes it to the final value,
104 104
      * it returns what ever value matches that key.
105 105
      *
106
-     * @param  ArrayValueObject $arrayValueObject
106
+     * @param  ArrayVO $arrayValueObject
107 107
      * @return bool|mixed
108 108
      */
109 109
     public function findArrayVO(ArrayVO $arrayValueObject)
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace BestServedCold\PhalueObjects;
4 4
 
5
-use BestServedCold\PhalueObjects\Contract\Arrayable;
6
-use BestServedCold\PhalueObjects\Contract\Countable;
7
-use BestServedCold\PhalueObjects\Exception\InvalidTypeException;
8
-use BestServedCold\PhalueObjects\Format\Json\Notation;
5
+use BestServedCold\PhalueObjects\Contract\Arrayable;
6
+use BestServedCold\PhalueObjects\Contract\Countable;
7
+use BestServedCold\PhalueObjects\Exception\InvalidTypeException;
8
+use BestServedCold\PhalueObjects\Format\Json\Notation;
9 9
 use Iterator;
10 10
 
11 11
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function getKey($key)
125 125
     {
126
-        return $this->keyExists($key) ? $this->value[$key] : false;
126
+        return $this->keyExists($key) ? $this->value[ $key ] : false;
127 127
     }
128 128
 
129 129
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function equals(ValueObject $object)
216 216
     {
217
-        if (! $object instanceof ArrayVO) {
217
+        if (!$object instanceof ArrayVO) {
218 218
             throw new InvalidTypeException($object, [ ArrayVO::class ]);
219 219
         }
220 220
 
Please login to merge, or discard this patch.
src/DateTime/DateTimeTrait.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace BestServedCold\PhalueObjects\DateTime;
4 4
 
5
+use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface;
5 6
 use BestServedCold\PhalueObjects\Mathematical\Operator\ArithmeticTrait;
6 7
 use BestServedCold\PhalueObjects\Mathematical\Operator\ComparisonTrait;
7 8
 use BestServedCold\PhalueObjects\Mathematical\Operator\TypeTrait;
8
-use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface;
9 9
 
10 10
 /**
11 11
  * Class DateTimeTrait
Please login to merge, or discard this patch.
src/DateTime/Time.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace BestServedCold\PhalueObjects\DateTime;
4 4
 
5
+use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface;
5 6
 use BestServedCold\PhalueObjects\DateTime\Unit\Hour;
6 7
 use BestServedCold\PhalueObjects\DateTime\Unit\Minute;
7 8
 use BestServedCold\PhalueObjects\DateTime\Unit\Second;
8 9
 use BestServedCold\PhalueObjects\Variadic;
9
-use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface;
10 10
 
11 11
 /**
12 12
  * Class Time
Please login to merge, or discard this patch.
src/File.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     /**
19 19
      * File constructor.
20
-     * @param array $value
20
+     * @param string $value
21 21
      * @param bool $mustExist
22 22
      * @param int $timeout
23 23
      */
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace BestServedCold\PhalueObjects;
2 2
 
3
-use BestServedCold\PhalueObjects\Format\Json;
4
-use BestServedCold\PhalueObjects\Format\Xml;
3
+use BestServedCold\PhalueObjects\Format\Json;
4
+use BestServedCold\PhalueObjects\Format\Xml;
5 5
 use BestServedCold\PhalueObjects\Format\Yaml;
6 6
 
7 7
 /**
Please login to merge, or discard this patch.
src/ValueObject.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace BestServedCold\PhalueObjects;
4 4
 
5
+use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface;
5 6
 use InvalidArgumentException;
6
-use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface;
7 7
 
8 8
 /**
9 9
  * Class ValueObject
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 return null;
139 139
             case 'unknown type':
140 140
             default:
141
-                throw new InvalidArgumentException('Cannot diff type [' . $this->type . '].');
141
+                throw new InvalidArgumentException('Cannot diff type ['.$this->type.'].');
142 142
         }
143 143
     }
144 144
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 return strlen($this->getValue());
160 160
             case 'unknown type':
161 161
             default:
162
-                throw new InvalidArgumentException('Cannot count type [' . $this->type . '].');
162
+                throw new InvalidArgumentException('Cannot count type ['.$this->type.'].');
163 163
         }
164 164
     }
165 165
 }
Please login to merge, or discard this patch.
src/Colour/Hex.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
         $hex = str_replace("#", "", $this->value);
18 18
 
19 19
         if (strlen($hex) == 3) {
20
-            $red   = hexdec($hex[0].$hex[0]);
21
-            $green = hexdec($hex[1].$hex[1]);
22
-            $blue  = hexdec($hex[2].$hex[2]);
20
+            $red   = hexdec($hex[ 0 ].$hex[ 0 ]);
21
+            $green = hexdec($hex[ 1 ].$hex[ 1 ]);
22
+            $blue  = hexdec($hex[ 2 ].$hex[ 2 ]);
23 23
         } else {
24
-            $red   = hexdec($hex[0].$hex[1]);
25
-            $green = hexdec($hex[2].$hex[3]);
26
-            $blue = hexdec($hex[4].$hex[5]);
24
+            $red   = hexdec($hex[ 0 ].$hex[ 1 ]);
25
+            $green = hexdec($hex[ 2 ].$hex[ 3 ]);
26
+            $blue = hexdec($hex[ 4 ].$hex[ 5 ]);
27 27
         }
28 28
 
29
-        return new Rgb([$red, $green, $blue]);
29
+        return new Rgb([ $red, $green, $blue ]);
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Null.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
      */
25 25
     public function __construct($value)
26 26
     {
27
-        if (! is_null($value)) {
28
-            throw new InvalidTypeException($value, ['object']);
27
+        if (!is_null($value)) {
28
+            throw new InvalidTypeException($value, [ 'object' ]);
29 29
         }
30 30
 
31 31
         parent::__construct($value);
Please login to merge, or discard this patch.
src/ObjectVO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
      */
24 24
     public function __construct($value)
25 25
     {
26
-        if (! is_object($value)) {
27
-            throw new InvalidTypeException($value, ['object']);
26
+        if (!is_object($value)) {
27
+            throw new InvalidTypeException($value, [ 'object' ]);
28 28
         }
29 29
 
30 30
         $this->reflection = new \ReflectionClass($this);
Please login to merge, or discard this patch.
src/StringVO.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
      */
26 26
     public function __construct($value)
27 27
     {
28
-        if (! is_string($value)) {
29
-            throw new InvalidTypeException($value, ['string']);
28
+        if (!is_string($value)) {
29
+            throw new InvalidTypeException($value, [ 'string' ]);
30 30
         }
31 31
         parent::__construct($value);
32 32
     }
Please login to merge, or discard this patch.