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

File /core/modules/user/lib/Drupal/user/Plugin/views/field/Language.php

Line 23: Unused local variable $uid

#2 remove_unused_variable_uid-2080591-7825202.patch634 bytesbeowulf1416
PASSED: [[SimpleTest]]: [MySQL] 58,384 pass(es). View


mrsinguyen’s picture

Status: Active » Needs review

Line 23: I see the $uid still use.

beowulf1416’s picture

634 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,384 pass(es). View

first attempt

rhm5000’s picture

Status: Needs review » Reviewed & tested by the community

@mrsinguyen Actually $uid variable before the conditional is unused because $uid is re-declared inside the conditional which is the $uid being used. Also $uid is only being used within the conditional's scope, so removing the one outside is correct.

Patch applies and unused $uid is removed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0acc459 and pushed to 8.x. Thanks!

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