@@ -3,8 +3,8 @@ |
||
3 | 3 | namespace BestServedCold\PhalueObjects\VOArray\Map; |
4 | 4 | |
5 | 5 | use BestServedCold\PhalueObjects\VOArray; |
6 | -use BestServedCold\PhalueObjects\VOClosure\KeyValue; |
|
7 | 6 | use BestServedCold\PhalueObjects\VOArray\Map; |
7 | +use BestServedCold\PhalueObjects\VOClosure\KeyValue; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Class Attribute |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | /** |
17 | 17 | * @param array $array |
18 | - * @return string |
|
18 | + * @return Attribute |
|
19 | 19 | */ |
20 | 20 | public static function fromArray(array $array) |
21 | 21 | { |
@@ -2,9 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace BestServedCold\PhalueObjects\VOString; |
4 | 4 | |
5 | -use BestServedCold\PhalueObjects\VOString; |
|
6 | - |
|
7 | 5 | use BestServedCold\PhalueObjects\VOArray\Map\Attribute as VOArrayAttribute; |
6 | +use BestServedCold\PhalueObjects\VOString; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Class Attribute |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | /** |
16 | 16 | * @param array $array |
17 | - * @return string |
|
17 | + * @return Pair |
|
18 | 18 | */ |
19 | 19 | public static function fromArray(array $array) |
20 | 20 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace BestServedCold\PhalueObjects\VOString; |
4 | 4 | |
5 | -use BestServedCold\PhalueObjects\VOString; |
|
6 | 5 | use BestServedCold\PhalueObjects\VOArray\Map\Pair as VOArrayPair; |
6 | +use BestServedCold\PhalueObjects\VOString; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Class Pair |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public static function fromVariadic(VOClosure $value, array ...$array) |
21 | 21 | { |
22 | 22 | return new static( |
23 | - call_user_func_array('array_map', array_merge([$value->getValue()], $array)) |
|
23 | + call_user_func_array('array_map', array_merge([ $value->getValue() ], $array)) |
|
24 | 24 | ); |
25 | 25 | } |
26 | 26 | } |
@@ -20,8 +20,8 @@ |
||
20 | 20 | public static function fromVars($prefix = null, $glue = null, $suffix = null) |
21 | 21 | { |
22 | 22 | return new static( |
23 | - function ($key, $value) use ($prefix, $glue, $suffix) { |
|
24 | - return $prefix . $key . $glue . $value . $suffix; |
|
23 | + function($key, $value) use ($prefix, $glue, $suffix) { |
|
24 | + return $prefix.$key.$glue.$value.$suffix; |
|
25 | 25 | } |
26 | 26 | ); |
27 | 27 | } |
@@ -23,8 +23,8 @@ |
||
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($value); |
@@ -24,8 +24,8 @@ |
||
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); |