Class %s cannot implement both Iterator and IteratorAggregate at the same time

Description

These two interfaces are incompatible one another. There must be only one of them.

Example

<?php

class A implements Iterator, IteratorAggregate {}

?>

Literal Examples

  • Class A cannot implement both Iterator and IteratorAggregate at the same time

Solutions

  • Choose one or the other interface.

  • Use the interface that is compatible with the parent classes.