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

File /core/modules/image/lib/Drupal/image/Tests/ImageFieldValidateTest.php

Line 51: Unused local variable $nid
Line 53: Unused local variable $nid
Line 72: Unused local variable $nid

Comments

mrsinguyen’s picture

Status: Active » Needs review
StatusFileSize
new1.71 KB

Status: Needs review » Needs work

The last submitted patch, drupal-core-remove-unused-local-variable-2080395.patch, failed testing.

lorique’s picture

Status: Needs work » Needs review
StatusFileSize
new2.13 KB

Last patch failed because of a double dollar ($) sign at line 52. Re-upped patch.

Status: Needs review » Needs work

The last submitted patch, drupal-core-remove-unused-local-variable-2080395_3.patch, failed testing.

mrsinguyen’s picture

Status: Needs work » Needs review
StatusFileSize
new1.71 KB

Added a new patch.

The last submitted patch, drupal-core-remove-unused-local-variable-2080395-2.patch, failed testing.

mrsinguyen’s picture

Status: Needs work » Needs review
areke’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The patch is good because it keeps the tests while removing the unused variables and applies cleanly. Thank you!

xjm’s picture

Title: Remove Unused local variable $nid from /core/modules/image/lib/Drupal/image/Tests/ImageFieldValidateTest.php » Remove unused local variables from the image module
Status: Reviewed & tested by the community » Needs review

Let's have someone confirm that the image module doesn't have any other unused local variables, so that we don't eat up another 5 hours of @webchick's time on a zillion 1 K patches. :)

xjm’s picture

Priority: Normal » Minor
areke’s picture

Status: Needs review » Reviewed & tested by the community

There are no other unused local variables in /core/modules/image. The patch still applies, so I'm resetting this to RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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