Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables
File /core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php
Line 41: Unused local variable $storage
Line 123: Unused local variable $active
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2080717-remove-unused-variables-8.patch | 1003 bytes | tr |
| #4 | 2080717-4.patch | 1.45 KB | areke |
| #1 | 2080717-remove-unused-variables.patch | 994 bytes | chertzog |
Comments
Comment #1
chertzogComment #2
enhdless commentedTried this patch, but the result is "patch does not apply"
Comment #3
areke commentedComment #4
areke commentedRe-rolled.
Comment #5
deneo2 commentedThe patch applies fine and solve the issue correctly. Good job!
Comment #6
tr commented1: 2080717-remove-unused-variables.patch queued for re-testing.
What's wrong with the first patch? It removes the entire line for each variable. The second patch just removes the variable but still performs a useless get() where the results aren't saved.
Comment #8
tr commentedI rebased the patch from #1 so that it applied to the current HEAD.
The patch from #4 is just wrong.
Comment #9
tr commentedComment #10
areke commentedSorry about that. Anyways, this applies and looks good. Thank you!
Comment #11
webchickCommitted and pushed to 8.x. Thanks!