Use shell_exec() instead of the backtick operator. It makes the code better readable. Besides someone looking at the code does not need to know that the use of backticks is identical to the function, also for those that are aware of it, it can easily be overlooked as it is so similar to single quotes.

We now use a mix of both that is also not really consistent code use and therefore by some considered bad practice.

Comments

lolandese created an issue. See original summary.

lolandese’s picture

Status: Active » Needs review
StatusFileSize
new5.29 KB

Fixes also Codesniffer Drupal and Drupal Practice suggestion (use DI).

  • lolandese committed d3498eb on 8.x-1.x
    Issue #3137864 by lolandese: Use shell_exec() consistently instead of...
lolandese’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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