@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | protected $valueType; |
9 | 9 | |
10 | - public function __construct(string $valueType, array $array = [], int $flags = 0, string $iteratorClass = "ArrayIterator") { |
|
10 | + public function __construct(string $valueType, array $array = [ ], int $flags = 0, string $iteratorClass = "ArrayIterator") { |
|
11 | 11 | $this->valueType = $valueType; |
12 | 12 | |
13 | 13 | $this->checkAllElements($array); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | private function checkAllElements(array $array): void |
44 | 44 | { |
45 | - array_walk($array, function ($value, $offset) { |
|
45 | + array_walk($array, function($value, $offset) { |
|
46 | 46 | $this->checkOffset($offset); |
47 | 47 | $this->checkType($value); |
48 | 48 | }); |
@@ -6,10 +6,10 @@ |
||
6 | 6 | { |
7 | 7 | protected $offsetType; |
8 | 8 | |
9 | - public function __construct(string $offsetType, string $valueType, array $array = [], int $flags = 0, string $iteratorClass = "ArrayIterator") |
|
9 | + public function __construct(string $offsetType, string $valueType, array $array = [ ], int $flags = 0, string $iteratorClass = "ArrayIterator") |
|
10 | 10 | { |
11 | 11 | $this->offsetType = $offsetType; |
12 | - $offsetAcceptedTypes = ['integer', 'string']; |
|
12 | + $offsetAcceptedTypes = [ 'integer', 'string' ]; |
|
13 | 13 | if (!in_array(strtolower($offsetType), $offsetAcceptedTypes)) { |
14 | 14 | throw new \InvalidArgumentException('Offest type must be of type: ' . implode(', ', $offsetAcceptedTypes) . '.'); |
15 | 15 | } |