@@ -7,8 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | namespace Robo\Common; |
| 9 | 9 | |
| 10 | -use Symfony\Component\Process\Exception\InvalidArgumentException; |
|
| 11 | - |
|
| 12 | 10 | /** |
| 13 | 11 | * ProcessUtils is a bunch of utility methods. We want to allow Robo 1.x |
| 14 | 12 | * to work with Symfony 4.x while remaining backwards compatibility. This |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public static function escapeArgument($argument) |
| 36 | 36 | { |
| 37 | - @trigger_error('The '.__METHOD__.'() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0.', E_USER_DEPRECATED); |
|
| 37 | + @trigger_error('The ' . __METHOD__ . '() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0.', E_USER_DEPRECATED); |
|
| 38 | 38 | |
| 39 | 39 | //Fix for PHP bug #43784 escapeshellarg removes % from given string |
| 40 | 40 | //Fix for PHP bug #49446 escapeshellarg doesn't work on Windows |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $escapedArgument .= '\\"'; |
| 53 | 53 | } elseif (self::isSurroundedBy($part, '%')) { |
| 54 | 54 | // Avoid environment variable expansion |
| 55 | - $escapedArgument .= '^%"'.substr($part, 1, -1).'"^%'; |
|
| 55 | + $escapedArgument .= '^%"' . substr($part, 1, -1) . '"^%'; |
|
| 56 | 56 | } else { |
| 57 | 57 | // escape trailing backslash |
| 58 | 58 | if ('\\' === substr($part, -1)) { |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | if ($quote) { |
| 66 | - $escapedArgument = '"'.$escapedArgument.'"'; |
|
| 66 | + $escapedArgument = '"' . $escapedArgument . '"'; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $escapedArgument; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - return "'".str_replace("'", "'\\''", $argument)."'"; |
|
| 72 | + return "'" . str_replace("'", "'\\''", $argument) . "'"; |
|
| 73 | 73 | } |
| 74 | 74 | } |