@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function __construct($value) |
24 | 24 | { |
25 | - if (!is_float($value) && ! is_int($value)) { |
|
25 | + if (!is_float($value) && !is_int($value)) { |
|
26 | 26 | throw new InvalidTypeException($value, [ 'float' ]); |
27 | 27 | } |
28 | 28 |
@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace BestServedCold\PhalueObjects\VOArray; |
4 | 4 | |
5 | 5 | use BestServedCold\PhalueObjects\VOArray; |
6 | -use BestServedCold\PhalueObjects\Exception\InvalidTypeException; |
|
7 | -use BestServedCold\PhalueObjects\Contract\ValueObject; |
|
8 | 6 | |
9 | 7 | /** |
10 | 8 | * Trait Metric |
@@ -38,10 +38,10 @@ |
||
38 | 38 | public function getDepth() |
39 | 39 | { |
40 | 40 | $max = 0; |
41 | - $depth = function (&$max) { |
|
41 | + $depth = function(&$max) { |
|
42 | 42 | return function($line) use (&$max) { |
43 | 43 | // every line-indent equals 4 spaces |
44 | - $max = max([$max, (strlen($line) - strlen(ltrim($line))) / 4]); |
|
44 | + $max = max([ $max, (strlen($line) - strlen(ltrim($line))) / 4 ]); |
|
45 | 45 | }; |
46 | 46 | }; |
47 | 47 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | /** |
13 | 13 | * @param float $float |
14 | - * @return mixed |
|
14 | + * @return \BestServedCold\PhalueObjects\VOFloat |
|
15 | 15 | */ |
16 | 16 | public static function fromFloat($float); |
17 | 17 |
@@ -44,6 +44,7 @@ |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @inheritdoc |
47 | + * @return void |
|
47 | 48 | */ |
48 | 49 | public function __destruct(); |
49 | 50 | } |
@@ -8,8 +8,8 @@ |
||
8 | 8 | use BestServedCold\PhalueObjects\VOClosure\Value; |
9 | 9 | use BestServedCold\PhalueObjects\VOFloat; |
10 | 10 | use BestServedCold\PhalueObjects\VOString; |
11 | -use BestServedCold\PhalueObjects\VOString\Word; |
|
12 | 11 | use BestServedCold\PhalueObjects\VOString\Mixin as VOStringTrait; |
12 | +use BestServedCold\PhalueObjects\VOString\Word; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class Byte |
@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * @param array $array |
29 | 29 | * @throws \InvalidArgumentException |
30 | - * @return string |
|
30 | + * @return Xml |
|
31 | 31 | */ |
32 | 32 | public static function fromArray(array $array) |
33 | 33 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace BestServedCold\PhalueObjects\Format; |
4 | 4 | |
5 | -use BestServedCold\PhalueObjects\Contract\VOArrayable; |
|
6 | -use BestServedCold\PhalueObjects\VOString; |
|
5 | +use BestServedCold\PhalueObjects\Contract\VOArrayable; |
|
6 | +use BestServedCold\PhalueObjects\VOString; |
|
7 | 7 | use Sabre\Xml\Service; |
8 | 8 | |
9 | 9 | /** |
@@ -2,14 +2,14 @@ |
||
2 | 2 | |
3 | 3 | namespace BestServedCold\PhalueObjects; |
4 | 4 | |
5 | -use BestServedCold\PhalueObjects\Contract\Arrayable; |
|
6 | -use BestServedCold\PhalueObjects\Contract\Diffable; |
|
7 | -use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface; |
|
8 | -use BestServedCold\PhalueObjects\VOArray\Iterator as IteratorTrait; |
|
9 | -use BestServedCold\PhalueObjects\VOArray\Key; |
|
10 | -use BestServedCold\PhalueObjects\VOArray\Metric; |
|
11 | -use BestServedCold\PhalueObjects\VOArray\Mutate; |
|
12 | -use BestServedCold\PhalueObjects\VOArray\Pointer; |
|
5 | +use BestServedCold\PhalueObjects\Contract\Arrayable; |
|
6 | +use BestServedCold\PhalueObjects\Contract\Diffable; |
|
7 | +use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface; |
|
8 | +use BestServedCold\PhalueObjects\VOArray\Iterator as IteratorTrait; |
|
9 | +use BestServedCold\PhalueObjects\VOArray\Key; |
|
10 | +use BestServedCold\PhalueObjects\VOArray\Metric; |
|
11 | +use BestServedCold\PhalueObjects\VOArray\Mutate; |
|
12 | +use BestServedCold\PhalueObjects\VOArray\Pointer; |
|
13 | 13 | use Iterator; |
14 | 14 | |
15 | 15 | /** |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * @param $arrayValue |
|
52 | + * @param string $arrayValue |
|
53 | 53 | * @return int|string |
54 | 54 | */ |
55 | 55 | public function keyFromArrayValue($arrayValue) |
@@ -14,10 +14,10 @@ |
||
14 | 14 | public static function toDepth() |
15 | 15 | { |
16 | 16 | return new static( |
17 | - function (&$max) { |
|
18 | - return function ($line) use (&$max) { |
|
17 | + function(&$max) { |
|
18 | + return function($line) use (&$max) { |
|
19 | 19 | // every line-indent equals 4 spaces |
20 | - $max = max([$max, (strlen($line) - strlen(ltrim($line))) / 4]); |
|
20 | + $max = max([ $max, (strlen($line) - strlen(ltrim($line))) / 4 ]); |
|
21 | 21 | }; |
22 | 22 | } |
23 | 23 | ); |