Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables

File /core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php

Line 31: Unused local variable $plugin
Line 39: Unused local variable $plugin

Comments

legolasbo’s picture

Attached patch removes the unused variables.

legolasbo’s picture

Status: Active » Needs review

Status: Needs review » Needs work
Issue tags: -Novice
legolasbo’s picture

Status: Needs work » Needs review
Issue tags: +Novice
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Check that variables ...

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Hm. Not sure about this one. It seems to make the code less readable.

michaelhiiva’s picture

Status: Needs review » Reviewed & tested by the community

The patch applies cleanly, list function on line 32 and 40 can be use this way in PHP and the code is readable.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Yep. Committed/pushed to 8.x, thanks!

tstoeckler’s picture

Hmm...
I would have thought the standard is

list(, $foo)

instead of

list( , $foo)

Should we start a docs issue for that?

Automatically closed -- issue fixed for 2 weeks with no activity.