Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables
File /core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
Line 30: Unused local variable $plugin
Comment | File | Size | Author |
---|---|---|---|
#1 | core-remove-unused-variable-MenuBlock.php-2061343-1.patch | 576 bytes | manu4543 |
Comments
Comment #1
manu4543 CreditAttribution: manu4543 commentedAttached patch removed Unused local variable $plugin in line 30
Comment #2
sergeypavlenko CreditAttribution: sergeypavlenko commentedAll right.
Comment #3
Dries CreditAttribution: Dries commentedIn this case, it actually decreases the readability of the code in my opinion. The variable is unused but it is helpful to understand the format of the data.
Comment #4
webchickAgreed.
Comment #5
manu4543 CreditAttribution: manu4543 commentedActually yes, it makes more sense to not remove that variable.