Skip to content

Commit 61b860e

Browse files
committed
default arguments removed from parent::__construct()
1 parent 59216d6 commit 61b860e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/TypedArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(string $type, array $array = [])
7676
}
7777

7878
//call parent constructor
79-
parent::__construct($array, 0, 'ArrayIterator');
79+
parent::__construct($array);
8080

8181
//store array type
8282
$this->type = $type;

src/TypedObjectArray.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public function __construct(string $type, array $array = [])
6969
}
7070

7171
//call parent constructor
72-
parent::__construct($array, 0, 'ArrayIterator');
72+
parent::__construct($array);
73+
7374
//store array type
7475
$this->type = $type;
7576
}
@@ -93,6 +94,7 @@ public function offsetSet($index, $newval)
9394

9495
return;
9596
}
97+
9698
throw new InvalidArgumentException(__CLASS__.': Elements passed to '.__CLASS__.' must be of the type '.$this->type.'.');
9799
}
98100
}

0 commit comments

Comments
 (0)