Make setIteratorMode final for stacks and queues

This commit is contained in:
Sebastian Meyer 2023-11-13 15:18:16 +01:00
parent 39d6cd31e6
commit bd4b72168f
2 changed files with 2 additions and 2 deletions

View File

@ -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.');

View File

@ -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.');