Skip to content

Commit b0ac22c

Browse files
authored
style fixed
1 parent b8f647e commit b0ac22c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/TypedArray.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class TypedArray extends ArrayObject
2222
{
2323
/**
24-
* @var array $allowedTypes Types supported by class
24+
* @var array Types supported by class
2525
*/
2626
protected $allowedTypes = [
2727
'array',
@@ -34,15 +34,15 @@ class TypedArray extends ArrayObject
3434
];
3535

3636
/**
37-
* @var string $type Current type for array
37+
* @var string Current type for array
3838
*/
3939
protected $type = '';
4040

4141
/**
4242
* Contructor.
4343
*
4444
* @param string $type
45-
* @param array $array
45+
* @param array $array
4646
* @throws InvalidArgumentException If type is not supported
4747
* @throws TypeError If elements of passed with $array
4848
* are not of the configured type
@@ -51,7 +51,7 @@ public function __construct(string $type, array $array = [])
5151
{
5252
//single class, multi type support :)
5353
//if (!isset($this->allowedTypes[$type])){
54-
if (!in_array($type, $this->allowedTypes)){
54+
if (!in_array($type, $this->allowedTypes)) {
5555
throw new InvalidArgumentException($type.' type passed to '.__CLASS__.' not supported');
5656
}
5757

@@ -84,6 +84,7 @@ public function offsetSet($index, $newval)
8484

8585
if ($is_($newval)) {
8686
parent::offsetSet($index, $newval);
87+
8788
return;
8889
}
8990
throw new TypeError('Elements passed to '.__CLASS__.' must be of the type '.$this->type);

0 commit comments

Comments
 (0)