mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
[ticket/12575] Remove inline assignments
PHPBB3-12575
This commit is contained in:
parent
bea9372efa
commit
6e47886227
@ -51,7 +51,8 @@ class service_collection extends \ArrayObject
|
||||
*/
|
||||
public function offsetGet($index)
|
||||
{
|
||||
if (($task = parent::offsetGet($index)) == null)
|
||||
$task = parent::offsetGet($index);
|
||||
if ($task == null)
|
||||
{
|
||||
$task = $this->container->get($index);
|
||||
$this->offsetSet($index, $task);
|
||||
|
@ -39,7 +39,8 @@ class service_collection_iterator extends \ArrayIterator
|
||||
*/
|
||||
public function offsetGet($index)
|
||||
{
|
||||
if (($task = parent::offsetGet($index)) == null)
|
||||
$task = parent::offsetGet($index);
|
||||
if ($task == null)
|
||||
{
|
||||
$task = $this->container->get($index);
|
||||
$this->offsetSet($index, $task);
|
||||
@ -61,7 +62,8 @@ class service_collection_iterator extends \ArrayIterator
|
||||
*/
|
||||
public function current()
|
||||
{
|
||||
if (($task = parent::current()) == null)
|
||||
$task = parent::current();
|
||||
if ($task == null)
|
||||
{
|
||||
$name = $this->key();
|
||||
$task = $this->container->get($name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user