1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/12575] Do not duplicate logic in service_collection_iterator.

PHPBB3-12575
This commit is contained in:
Andreas Fischer
2014-06-14 18:33:23 +02:00
parent f460287856
commit 2149bd4e8f

View File

@@ -41,14 +41,6 @@ class service_collection_iterator extends \ArrayIterator
*/
public function current()
{
$task = parent::current();
if ($task === null)
{
$name = $this->key();
$task = $this->collection->offsetGet($name);
$this->offsetSet($name, $task);
}
return $task;
return $this->collection->offsetGet($this->key());
}
}