1
0
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:
Tristan Darricau 2014-05-22 01:24:11 +02:00
parent bea9372efa
commit 6e47886227
2 changed files with 6 additions and 3 deletions

View File

@ -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);

View File

@ -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);