[ticket/12575] Workaround for offsetExists seems not required for the Iterator.

PHPBB3-12575
This commit is contained in:
Andreas Fischer 2014-06-14 15:01:08 +02:00
parent 87a13a8c77
commit f460287856

View file

@ -36,21 +36,6 @@ class service_collection_iterator extends \ArrayIterator
$this->collection = $collection;
}
// Because of a PHP issue we have to redefine offsetExists
// (even with a call to the parent):
// https://bugs.php.net/bug.php?id=66834
// https://bugs.php.net/bug.php?id=67067
// But it triggers a sniffer issue that we have to skip
// @codingStandardsIgnoreStart
/**
* {@inheritdoc}
*/
public function offsetExists($index)
{
parent::offsetExists($index);
}
// @codingStandardsIgnoreEnd
/**
* {@inheritdoc}
*/
@ -60,7 +45,7 @@ class service_collection_iterator extends \ArrayIterator
if ($task === null)
{
$name = $this->key();
$task = $this->collection[$name];
$task = $this->collection->offsetGet($name);
$this->offsetSet($name, $task);
}