Skip to content

Commit

Permalink
Removed unneeded implements clauses from Iterators.
Browse files Browse the repository at this point in the history
Fixes error "Interface/Class cannot implement previously implemented interface".
  • Loading branch information
CarsonF committed Jul 7, 2017
1 parent 38e7c38 commit 5b6cbb3
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Phar/Phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PharException extends Exception {
* phar archives.
* @link http://php.net/manual/en/class.phar.php
*/
class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, SeekableIterator, Traversable, Iterator, Countable, ArrayAccess {
class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, SeekableIterator, Countable, ArrayAccess {
const BZ2 = 8192;
const GZ = 4096;
const NONE = 0;
Expand Down
48 changes: 23 additions & 25 deletions SPL/SPL.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class UnexpectedValueException extends RuntimeException {
* The EmptyIterator class for an empty iterator.
* @link http://www.php.net/manual/en/class.emptyiterator.php
*/
class EmptyIterator implements Iterator, Traversable {
class EmptyIterator implements Iterator {

/**
* Return the current element
Expand Down Expand Up @@ -157,7 +157,7 @@ public function rewind() { }
* @link http://www.php.net/manual/en/class.callbackfilteriterator.php
* @since 5.4.0
*/
class CallbackFilterIterator extends FilterIterator implements Iterator , Traversable , OuterIterator {
class CallbackFilterIterator extends FilterIterator {

/**
* Creates a filtered iterator using the callback to determine which items are accepted or rejected.
Expand All @@ -184,7 +184,7 @@ public function accept() { }
* RecursiveCallbackFilterIterator from a RecursiveIterator
* @link http://www.php.net/manual/en/class.recursivecallbackfilteriterator.php
*/
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements OuterIterator , Traversable , Iterator , RecursiveIterator {
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator {

/**
* Create a RecursiveCallbackFilterIterator from a RecursiveIterator
Expand Down Expand Up @@ -216,7 +216,7 @@ public function getChildren() { }
* over iterators recursively.
* @link http://php.net/manual/en/class.recursiveiterator.php
*/
interface RecursiveIterator extends Iterator, Traversable {
interface RecursiveIterator extends Iterator {

/**
* Returns if an iterator can be created for the current entry.
Expand All @@ -239,7 +239,7 @@ public function getChildren();
* Can be used to iterate through recursive iterators.
* @link http://php.net/manual/en/class.recursiveiteratoriterator.php
*/
class RecursiveIteratorIterator implements Iterator, Traversable, OuterIterator {
class RecursiveIteratorIterator implements OuterIterator {
const LEAVES_ONLY = 0;
const SELF_FIRST = 1;
const CHILD_FIRST = 2;
Expand Down Expand Up @@ -402,7 +402,7 @@ public function getMaxDepth() { }
* over iterators.
* @link http://php.net/manual/en/class.outeriterator.php
*/
interface OuterIterator extends Iterator, Traversable {
interface OuterIterator extends Iterator {

/**
* Returns the inner iterator for the current entry.
Expand All @@ -423,7 +423,7 @@ public function getInnerIterator();
* misuse, otherwise expect exceptions or fatal errors.
* @link http://php.net/manual/en/class.iteratoriterator.php
*/
class IteratorIterator implements Iterator, Traversable, OuterIterator {
class IteratorIterator implements OuterIterator {

/**
* Create an iterator from anything that is traversable
Expand Down Expand Up @@ -488,7 +488,7 @@ public function next() { }
* must be implemented in the subclass.
* @link http://php.net/manual/en/class.filteriterator.php
*/
abstract class FilterIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
abstract class FilterIterator extends IteratorIterator {

/**
* Check whether the current element of the iterator is acceptable
Expand Down Expand Up @@ -561,7 +561,7 @@ public function getInnerIterator() { }
* The <b>RecursiveFilterIterator::accept</b> must be implemented in the subclass.
* @link http://php.net/manual/en/class.recursivefilteriterator.php
*/
abstract class RecursiveFilterIterator extends FilterIterator implements Iterator, Traversable, OuterIterator, RecursiveIterator {
abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator {

/**
* Create a RecursiveFilterIterator from a RecursiveIterator
Expand Down Expand Up @@ -592,7 +592,7 @@ public function getChildren() { }
* This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children.
* @link http://php.net/manual/en/class.parentiterator.php
*/
class ParentIterator extends RecursiveFilterIterator implements RecursiveIterator, OuterIterator, Traversable, Iterator {
class ParentIterator extends RecursiveFilterIterator {

/**
* Determines acceptability
Expand Down Expand Up @@ -650,7 +650,7 @@ public function count();
* The Seekable iterator.
* @link http://php.net/manual/en/class.seekableiterator.php
*/
interface SeekableIterator extends Iterator, Traversable {
interface SeekableIterator extends Iterator {

/**
* Seeks to a position
Expand All @@ -669,7 +669,7 @@ public function seek($position);
* a limited subset of items in an <b>Iterator</b>.
* @link http://php.net/manual/en/class.limititerator.php
*/
class LimitIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
class LimitIterator extends IteratorIterator {

/**
* Construct a LimitIterator
Expand Down Expand Up @@ -753,7 +753,7 @@ public function getInnerIterator() { }
* This object supports cached iteration over another iterator.
* @link http://php.net/manual/en/class.cachingiterator.php
*/
class CachingIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator, ArrayAccess, Countable {
class CachingIterator extends IteratorIterator implements ArrayAccess, Countable {
const CALL_TOSTRING = 1;
const CATCH_GET_CHILD = 16;
const TOSTRING_USE_KEY = 2;
Expand Down Expand Up @@ -920,8 +920,7 @@ public function count() { }
* ...
* @link http://php.net/manual/en/class.recursivecachingiterator.php
*/
class RecursiveCachingIterator extends CachingIterator
implements Countable, ArrayAccess, Iterator, Traversable, OuterIterator, RecursiveIterator {
class RecursiveCachingIterator extends CachingIterator implements RecursiveIterator {

/**
* Construct
Expand Down Expand Up @@ -955,7 +954,7 @@ public function getChildren() { }
* This iterator cannot be rewinded.
* @link http://php.net/manual/en/class.norewinditerator.php
*/
class NoRewindIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
class NoRewindIterator extends IteratorIterator {

/**
* Construct a NoRewindIterator
Expand Down Expand Up @@ -1018,7 +1017,7 @@ public function getInnerIterator() { }
* An Iterator that iterates over several iterators one after the other.
* @link http://php.net/manual/en/class.appenditerator.php
*/
class AppendIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
class AppendIterator extends IteratorIterator {

/**
* Constructs an AppendIterator
Expand Down Expand Up @@ -1109,7 +1108,7 @@ public function getArrayIterator() { }
* rewind the iterator upon reaching its end.
* @link http://php.net/manual/en/class.infiniteiterator.php
*/
class InfiniteIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
class InfiniteIterator extends IteratorIterator {

/**
* Constructs an InfiniteIterator
Expand All @@ -1132,7 +1131,7 @@ public function next() { }
* This iterator can be used to filter another iterator based on a regular expression.
* @link http://php.net/manual/en/class.regexiterator.php
*/
class RegexIterator extends FilterIterator implements Iterator, Traversable, OuterIterator {
class RegexIterator extends FilterIterator {

/**
* Return all matches for the current entry @see preg_match_all
Expand Down Expand Up @@ -1318,7 +1317,7 @@ public function setPregFlags($preg_flags) { }
* This recursive iterator can filter another recursive iterator via a regular expression.
* @link http://php.net/manual/en/class.recursiveregexiterator.php
*/
class RecursiveRegexIterator extends RegexIterator implements OuterIterator, Traversable, Iterator, RecursiveIterator {
class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator {
/**
* Creates a new RecursiveRegexIterator.
* @link http://php.net/manual/en/recursiveregexiterator.construct.php
Expand Down Expand Up @@ -1352,7 +1351,7 @@ public function getChildren() { }
* Allows iterating over a <b>RecursiveIterator</b> to generate an ASCII graphic tree.
* @link http://php.net/manual/en/class.recursivetreeiterator.php
*/
class RecursiveTreeIterator extends RecursiveIteratorIterator implements OuterIterator, Traversable, Iterator {
class RecursiveTreeIterator extends RecursiveIteratorIterator {

const BYPASS_CURRENT = 4;
const BYPASS_KEY = 8;
Expand Down Expand Up @@ -1516,7 +1515,7 @@ public function getPostfix() { }
* This class allows objects to work as arrays.
* @link http://php.net/manual/en/class.arrayobject.php
*/
class ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable {
class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable {
/**
* Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).
*/
Expand Down Expand Up @@ -1791,7 +1790,7 @@ public function getIteratorClass() { }
* over Arrays and Objects.
* @link http://php.net/manual/en/class.arrayiterator.php
*/
class ArrayIterator implements Iterator, Traversable, ArrayAccess, SeekableIterator, Serializable, Countable {
class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable {
const STD_PROP_LIST = 1;
const ARRAY_AS_PROPS = 2;

Expand Down Expand Up @@ -2035,8 +2034,7 @@ public function seek($position) { }
* over the current iterator entry.
* @link http://php.net/manual/en/class.recursivearrayiterator.php
*/
class RecursiveArrayIterator extends ArrayIterator
implements Serializable, SeekableIterator, ArrayAccess, Traversable, Iterator, RecursiveIterator {
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator {
const CHILD_ARRAYS_ONLY = 4;


Expand Down
32 changes: 16 additions & 16 deletions SPL/SPL_c1.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function __toString () {}
* the contents of filesystem directories.
* @link http://php.net/manual/en/class.directoryiterator.php
*/
class DirectoryIterator extends SplFileInfo implements Iterator, Traversable, SeekableIterator {
class DirectoryIterator extends SplFileInfo implements SeekableIterator {

/**
* Constructs a new directory iterator from a path
Expand Down Expand Up @@ -353,7 +353,7 @@ public function seek ($position) {}
* The Filesystem iterator
* @link http://php.net/manual/en/class.filesystemiterator.php
*/
class FilesystemIterator extends DirectoryIterator implements SeekableIterator, Traversable, Iterator {
class FilesystemIterator extends DirectoryIterator {
const CURRENT_MODE_MASK = 240;
const CURRENT_AS_PATHNAME = 32;
const CURRENT_AS_FILEINFO = 0;
Expand Down Expand Up @@ -435,7 +435,7 @@ public function setFlags ($flags = null) {}
* an interface for iterating recursively over filesystem directories.
* @link http://php.net/manual/en/class.recursivedirectoryiterator.php
*/
class RecursiveDirectoryIterator extends FilesystemIterator implements Iterator, Traversable, SeekableIterator, RecursiveIterator {
class RecursiveDirectoryIterator extends FilesystemIterator implements RecursiveIterator {


/**
Expand Down Expand Up @@ -522,7 +522,7 @@ public function current () {}
* <b>glob</b>.
* @link http://php.net/manual/en/class.globiterator.php
*/
class GlobIterator extends FilesystemIterator implements Iterator, Traversable, SeekableIterator, Countable {
class GlobIterator extends FilesystemIterator implements Countable {

/**
* Construct a directory using glob
Expand All @@ -547,7 +547,7 @@ public function count () {}
* The SplFileObject class offers an object oriented interface for a file.
* @link http://php.net/manual/en/class.splfileobject.php
*/
class SplFileObject extends SplFileInfo implements RecursiveIterator, Traversable, Iterator, SeekableIterator {
class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator {
const DROP_NEW_LINE = 1;
const READ_AHEAD = 2;
const SKIP_EMPTY = 6;
Expand Down Expand Up @@ -928,7 +928,7 @@ public function __toString () {}
* The SplTempFileObject class offers an object oriented interface for a temporary file.
* @link http://php.net/manual/en/class.spltempfileobject.php
*/
class SplTempFileObject extends SplFileObject implements SeekableIterator, Iterator, Traversable, RecursiveIterator {
class SplTempFileObject extends SplFileObject {


/**
Expand All @@ -944,7 +944,7 @@ public function __construct ($max_memory) {}
* The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.
* @link http://php.net/manual/en/class.spldoublylinkedlist.php
*/
class SplDoublyLinkedList implements Iterator, Traversable, Countable, ArrayAccess {
class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess {
const IT_MODE_LIFO = 2;
const IT_MODE_FIFO = 0;
const IT_MODE_DELETE = 1;
Expand Down Expand Up @@ -1170,7 +1170,7 @@ public function serialize () {}
* The SplQueue class provides the main functionalities of a queue implemented using a doubly linked list.
* @link http://php.net/manual/en/class.splqueue.php
*/
class SplQueue extends SplDoublyLinkedList implements ArrayAccess, Countable, Traversable, Iterator {
class SplQueue extends SplDoublyLinkedList {


/**
Expand Down Expand Up @@ -1210,7 +1210,7 @@ public function setIteratorMode ($mode) {}
* The SplStack class provides the main functionalities of a stack implemented using a doubly linked list.
* @link http://php.net/manual/en/class.splstack.php
*/
class SplStack extends SplDoublyLinkedList implements ArrayAccess, Countable, Traversable, Iterator {
class SplStack extends SplDoublyLinkedList {

/**
* Sets the mode of iteration
Expand All @@ -1230,7 +1230,7 @@ public function setIteratorMode ($mode) {}
* The SplHeap class provides the main functionalities of an Heap.
* @link http://php.net/manual/en/class.splheap.php
*/
abstract class SplHeap implements Iterator, Traversable, Countable {
abstract class SplHeap implements Iterator, Countable {

/**
* Extracts a node from top of the heap and sift up.
Expand Down Expand Up @@ -1346,7 +1346,7 @@ abstract protected function compare ($value1, $value2);
* The SplMinHeap class provides the main functionalities of a heap, keeping the minimum on the top.
* @link http://php.net/manual/en/class.splminheap.php
*/
class SplMinHeap extends SplHeap implements Countable, Traversable, Iterator {
class SplMinHeap extends SplHeap {

/**
* Compare elements in order to place them correctly in the heap while sifting up.
Expand Down Expand Up @@ -1462,7 +1462,7 @@ public function recoverFromCorruption () {}
* The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top.
* @link http://php.net/manual/en/class.splmaxheap.php
*/
class SplMaxHeap extends SplHeap implements Countable, Traversable, Iterator {
class SplMaxHeap extends SplHeap {

/**
* Compare elements in order to place them correctly in the heap while sifting up.
Expand All @@ -1487,7 +1487,7 @@ protected function compare ($value1, $value2) {}
* prioritized queue, implemented using a heap.
* @link http://php.net/manual/en/class.splpriorityqueue.php
*/
class SplPriorityQueue implements Iterator, Traversable, Countable {
class SplPriorityQueue implements Iterator, Countable {
const EXTR_BOTH = 3;
const EXTR_PRIORITY = 2;
const EXTR_DATA = 1;
Expand Down Expand Up @@ -1628,7 +1628,7 @@ public function recoverFromCorruption () {}
* implementation.
* @link http://php.net/manual/en/class.splfixedarray.php
*/
class SplFixedArray implements Iterator, Traversable, ArrayAccess, Countable {
class SplFixedArray implements Iterator, ArrayAccess, Countable {

/**
* Constructs a new fixed array
Expand Down Expand Up @@ -1842,7 +1842,7 @@ public function notify ();
* cases involving the need to uniquely identify objects.
* @link http://php.net/manual/en/class.splobjectstorage.php
*/
class SplObjectStorage implements Countable, Iterator, Traversable, Serializable, ArrayAccess {
class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess {

/**
* Adds an object in the storage
Expand Down Expand Up @@ -2063,7 +2063,7 @@ public function getHash($object) {}
* An Iterator that sequentially iterates over all attached iterators
* @link http://php.net/manual/en/class.multipleiterator.php
*/
class MultipleIterator implements Iterator, Traversable {
class MultipleIterator implements Iterator {
const MIT_NEED_ANY = 0;
const MIT_NEED_ALL = 1;
const MIT_KEYS_NUMERIC = 0;
Expand Down
2 changes: 1 addition & 1 deletion SQLite/SQLite.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function fetchColumnTypes ($table_name, $result_type = SQLITE_ASSOC) {}
/**
* @link http://php.net/manual/en/ref.sqlite.php
*/
final class SQLiteResult implements Iterator, Traversable, Countable {
final class SQLiteResult implements Iterator, Countable {

/**
* (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
Expand Down
2 changes: 1 addition & 1 deletion SimpleXML/SimpleXML.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function count () {}
* The SimpleXMLIterator provides recursive iteration over all nodes of a <b>SimpleXMLElement</b> object.
* @link http://php.net/manual/en/class.simplexmliterator.php
*/
class SimpleXMLIterator extends SimpleXMLElement implements Traversable, RecursiveIterator, Iterator, Countable {
class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable {

/**
* Rewind to the first element
Expand Down
4 changes: 2 additions & 2 deletions http/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static function factory ($flags = null, $class_name = null) {}
/**
* @link http://php.net/manual/en/class.httpmessage.php
*/
class HttpMessage implements Countable, Serializable, Iterator, Traversable {
class HttpMessage implements Countable, Serializable, Iterator {
const TYPE_NONE = 0;
const TYPE_REQUEST = 1;
const TYPE_RESPONSE = 2;
Expand Down Expand Up @@ -1527,7 +1527,7 @@ public static function singleton ($global) {}
/**
* @link http://php.net/manual/en/class.httprequestpool.php
*/
class HttpRequestPool implements Countable, Iterator, Traversable {
class HttpRequestPool implements Countable, Iterator {

/**
* (PECL pecl_http &gt;= 0.10.0)<br/>
Expand Down
Loading

0 comments on commit 5b6cbb3

Please sign in to comment.