mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/12575] Workaround for offsetExists seems not required for the Iterator.
PHPBB3-12575
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user