mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12575] Remove inline assignments
PHPBB3-12575
This commit is contained in:
parent
bea9372efa
commit
6e47886227
2 changed files with 6 additions and 3 deletions
|
@ -51,7 +51,8 @@ class service_collection extends \ArrayObject
|
||||||
*/
|
*/
|
||||||
public function offsetGet($index)
|
public function offsetGet($index)
|
||||||
{
|
{
|
||||||
if (($task = parent::offsetGet($index)) == null)
|
$task = parent::offsetGet($index);
|
||||||
|
if ($task == null)
|
||||||
{
|
{
|
||||||
$task = $this->container->get($index);
|
$task = $this->container->get($index);
|
||||||
$this->offsetSet($index, $task);
|
$this->offsetSet($index, $task);
|
||||||
|
|
|
@ -39,7 +39,8 @@ class service_collection_iterator extends \ArrayIterator
|
||||||
*/
|
*/
|
||||||
public function offsetGet($index)
|
public function offsetGet($index)
|
||||||
{
|
{
|
||||||
if (($task = parent::offsetGet($index)) == null)
|
$task = parent::offsetGet($index);
|
||||||
|
if ($task == null)
|
||||||
{
|
{
|
||||||
$task = $this->container->get($index);
|
$task = $this->container->get($index);
|
||||||
$this->offsetSet($index, $task);
|
$this->offsetSet($index, $task);
|
||||||
|
@ -61,7 +62,8 @@ class service_collection_iterator extends \ArrayIterator
|
||||||
*/
|
*/
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
if (($task = parent::current()) == null)
|
$task = parent::current();
|
||||||
|
if ($task == null)
|
||||||
{
|
{
|
||||||
$name = $this->key();
|
$name = $this->key();
|
||||||
$task = $this->container->get($name);
|
$task = $this->container->get($name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue