Whilst reviewing views code these unused variables keep cropping up. Let's save a few cpu cycles.

CommentFileSizeAuthor
d8.views-unused-vars.patch3.28 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darol100’s picture

Status: Needs review » Reviewed & tested by the community

This patch looks good to me. @alexpott, Should we have a meta issue to remove unused variables ?

Anonymous’s picture

yep all of the variables are really unused rtbc+1

dawehner’s picture

+1

@darol100
I think we had one in the past, and these are the remaining ones ...

@alexpott
I would like to see the Result.php be converted back to less magic php code, so something like this:

      $replacements["@start"] = $start;
      $replacements["@end"] = $end;

because otherwise you could easily think that all those variables are actually not in use. We aren't saving many lines of code here anyway.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 53c266b on 8.0.x
    Issue #2475221 by alexpott: Remove some unused varaibles from views
    

Status: Fixed » Closed (fixed)

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