Make setIteratorMode final for stacks and queues
This commit is contained in:
parent
39d6cd31e6
commit
bd4b72168f
|
@ -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.');
|
||||
|
|
|
@ -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.');
|
||||
|
|
Loading…
Reference in New Issue