@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function handle() |
| 65 | 65 | { |
| 66 | - $argv = $_SERVER[ 'argv' ]; |
|
| 66 | + $argv = $_SERVER['argv']; |
|
| 67 | 67 | |
| 68 | - if ($_SERVER[ 'SCRIPT_NAME' ] === $_SERVER[ 'argv' ][ 0 ]) { |
|
| 68 | + if ($_SERVER['SCRIPT_NAME'] === $_SERVER['argv'][0]) { |
|
| 69 | 69 | array_shift($argv); |
| 70 | 70 | |
| 71 | 71 | if (empty($argv)) { |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - $this->string = str_replace(['/', '\\', ':'], '/', $argv[ 0 ]); |
|
| 76 | + $this->string = str_replace(['/', '\\', ':'], '/', $argv[0]); |
|
| 77 | 77 | $this->commands = explode('/', $this->string); |
| 78 | 78 | |
| 79 | - if (strpos($this->commands[ 0 ], '--') !== false |
|
| 80 | - || strpos($this->commands[ 0 ], '-') !== false |
|
| 79 | + if (strpos($this->commands[0], '--') !== false |
|
| 80 | + || strpos($this->commands[0], '-') !== false |
|
| 81 | 81 | ) { |
| 82 | 82 | $options = $this->commands; |
| 83 | 83 | $this->commands = []; |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | if (strpos($option, '=') !== false) { |
| 98 | 98 | $optionParts = explode('=', $option); |
| 99 | - $option = $optionParts[ 0 ]; |
|
| 100 | - $value = $optionParts[ 1 ]; |
|
| 99 | + $option = $optionParts[0]; |
|
| 100 | + $value = $optionParts[1]; |
|
| 101 | 101 | } else { |
| 102 | 102 | $value = current($options); |
| 103 | 103 | } |
@@ -111,21 +111,21 @@ discard block |
||
| 111 | 111 | if (strpos($value, '--') === false |
| 112 | 112 | || strpos($value, '-') === false |
| 113 | 113 | ) { |
| 114 | - $_GET[ $option ] = $value; |
|
| 114 | + $_GET[$option] = $value; |
|
| 115 | 115 | } else { |
| 116 | - $_GET[ $option ] = null; |
|
| 116 | + $_GET[$option] = null; |
|
| 117 | 117 | } |
| 118 | 118 | } else { |
| 119 | 119 | $keys = array_keys($_GET); |
| 120 | 120 | if (count($keys)) { |
| 121 | 121 | $key = end($keys); |
| 122 | - $_GET[ $key ] = $option; |
|
| 122 | + $_GET[$key] = $option; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | if (array_key_exists('verbose', $_GET) or array_key_exists('v', $_GET)) { |
| 128 | - $_ENV[ 'VERBOSE' ] = true; |
|
| 128 | + $_ENV['VERBOSE'] = true; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | $this->parseCommands($this->commands); |