diff --git a/src/DataStructures/StrictQueue.php b/src/DataStructures/StrictQueue.php index 2401859..daa065c 100644 --- a/src/DataStructures/StrictQueue.php +++ b/src/DataStructures/StrictQueue.php @@ -47,7 +47,7 @@ class StrictQueue extends StrictList * * @throws \RuntimeException */ - public function setIteratorMode(int $mode): int + final public function setIteratorMode(int $mode): int { if ($mode > 1) { throw new RuntimeException('Changing the iterator direction of ' . static::class . ' is prohibited.'); diff --git a/src/DataStructures/StrictStack.php b/src/DataStructures/StrictStack.php index ee90be1..71f73c6 100644 --- a/src/DataStructures/StrictStack.php +++ b/src/DataStructures/StrictStack.php @@ -47,7 +47,7 @@ class StrictStack extends StrictList * * @throws \RuntimeException */ - public function setIteratorMode(int $mode): int + final public function setIteratorMode(int $mode): int { if ($mode < 2) { throw new RuntimeException('Changing the iterator direction of ' . static::class . ' is prohibited.');