@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | |
253 | 253 | if ($option->isNegatable()) { |
254 | - $negatedName = 'no-'.$option->getName(); |
|
254 | + $negatedName = 'no-' . $option->getName(); |
|
255 | 255 | if (isset($this->options[$negatedName])) { |
256 | 256 | throw new LogicException(sprintf('An option named "%s" already exists.', $negatedName)); |
257 | 257 | } |
@@ -406,19 +406,19 @@ discard block |
||
406 | 406 | |
407 | 407 | $tail = ''; |
408 | 408 | foreach ($this->getArguments() as $argument) { |
409 | - $element = '<'.$argument->getName().'>'; |
|
409 | + $element = '<' . $argument->getName() . '>'; |
|
410 | 410 | if ($argument->isArray()) { |
411 | 411 | $element .= '...'; |
412 | 412 | } |
413 | 413 | |
414 | 414 | if (!$argument->isRequired()) { |
415 | - $element = '['.$element; |
|
415 | + $element = '[' . $element; |
|
416 | 416 | $tail .= ']'; |
417 | 417 | } |
418 | 418 | |
419 | 419 | $elements[] = $element; |
420 | 420 | } |
421 | 421 | |
422 | - return implode(' ', $elements).$tail; |
|
422 | + return implode(' ', $elements) . $tail; |
|
423 | 423 | } |
424 | 424 | } |
@@ -61,11 +61,11 @@ |
||
61 | 61 | $tokens[] = $token; |
62 | 62 | $token = null; |
63 | 63 | } |
64 | - } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) { |
|
65 | - $token .= $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1))); |
|
66 | - } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) { |
|
64 | + } elseif (preg_match('/([^="\'\s]+?)(=?)(' . self::REGEX_QUOTED_STRING . '+)/A', $input, $match, 0, $cursor)) { |
|
65 | + $token .= $match[1] . $match[2] . stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1))); |
|
66 | + } elseif (preg_match('/' . self::REGEX_QUOTED_STRING . '/A', $input, $match, 0, $cursor)) { |
|
67 | 67 | $token .= stripcslashes(substr($match[0], 1, -1)); |
68 | - } elseif (preg_match('/'.self::REGEX_UNQUOTED_STRING.'/A', $input, $match, 0, $cursor)) { |
|
68 | + } elseif (preg_match('/' . self::REGEX_UNQUOTED_STRING . '/A', $input, $match, 0, $cursor)) { |
|
69 | 69 | $token .= $match[1]; |
70 | 70 | } else { |
71 | 71 | // should never happen |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $definition = $this->definition; |
69 | 69 | $givenArguments = $this->arguments; |
70 | 70 | |
71 | - $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { |
|
71 | + $missingArguments = array_filter(array_keys($definition->getArguments()), function($argument) use ($definition, $givenArguments) { |
|
72 | 72 | return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); |
73 | 73 | }); |
74 | 74 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | use Symfony\Polyfill\Mbstring as p; |
13 | 13 | |
14 | 14 | if (\PHP_VERSION_ID >= 80000) { |
15 | - return require __DIR__.'/bootstrap80.php'; |
|
15 | + return require __DIR__ . '/bootstrap80.php'; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!function_exists('mb_convert_encoding')) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'A' => 'a', |
5 | 5 | 'B' => 'b', |
6 | 6 | 'C' => 'c', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'a' => 'A', |
5 | 5 | 'b' => 'B', |
6 | 6 | 'c' => 'C', |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | foreach ($paths as $path) { |
60 | 60 | if (preg_match('/\.php$/i', $path)) { |
61 | 61 | // Prevent variable leak into deploy.php file |
62 | - call_user_func(function () use ($path) { |
|
62 | + call_user_func(function() use ($path) { |
|
63 | 63 | // Reorder autoload stack |
64 | 64 | $originStack = spl_autoload_functions(); |
65 | 65 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } elseif (preg_match('/\.ya?ml$/i', $path)) { |
77 | 77 | self::$recipeFilename = basename($path); |
78 | 78 | self::$recipeSource = file_get_contents($path, true); |
79 | - $root = array_filter(Yaml::parse(self::$recipeSource), static function (string $key) { |
|
79 | + $root = array_filter(Yaml::parse(self::$recipeSource), static function(string $key) { |
|
80 | 80 | return substr($key, 0, 1) !== '.'; |
81 | 81 | }, ARRAY_FILTER_USE_KEY); |
82 | 82 | |
@@ -131,17 +131,17 @@ discard block |
||
131 | 131 | |
132 | 132 | protected static function tasks(array $tasks) |
133 | 133 | { |
134 | - $buildTask = function ($name, $steps) { |
|
135 | - $body = function () {}; |
|
134 | + $buildTask = function($name, $steps) { |
|
135 | + $body = function() {}; |
|
136 | 136 | $task = task($name, $body); |
137 | 137 | |
138 | 138 | foreach ($steps as $step) { |
139 | - $buildStep = function ($step) use (&$body, $task) { |
|
139 | + $buildStep = function($step) use (&$body, $task) { |
|
140 | 140 | extract($step); |
141 | 141 | |
142 | 142 | if (isset($cd)) { |
143 | 143 | $prev = $body; |
144 | - $body = function () use ($cd, $prev) { |
|
144 | + $body = function() use ($cd, $prev) { |
|
145 | 145 | $prev(); |
146 | 146 | cd($cd); |
147 | 147 | }; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | if (isset($run)) { |
151 | 151 | $has = 'run'; |
152 | 152 | $prev = $body; |
153 | - $body = function () use ($run, $prev) { |
|
153 | + $body = function() use ($run, $prev) { |
|
154 | 154 | $prev(); |
155 | 155 | try { |
156 | 156 | run($run); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | $has = 'run_locally'; |
170 | 170 | $prev = $body; |
171 | - $body = function () use ($run_locally, $prev) { |
|
171 | + $body = function() use ($run_locally, $prev) { |
|
172 | 172 | $prev(); |
173 | 173 | try { |
174 | 174 | runLocally($run_locally); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | $has = 'upload'; |
188 | 188 | $prev = $body; |
189 | - $body = function () use ($upload, $prev) { |
|
189 | + $body = function() use ($upload, $prev) { |
|
190 | 190 | $prev(); |
191 | 191 | upload($upload['src'], $upload['dest']); |
192 | 192 | }; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | $has = 'download'; |
200 | 200 | $prev = $body; |
201 | - $body = function () use ($download, $prev) { |
|
201 | + $body = function() use ($download, $prev) { |
|
202 | 202 | $prev(); |
203 | 203 | download($download['src'], $download['dest']); |
204 | 204 | }; |
@@ -120,7 +120,7 @@ |
||
120 | 120 | |
121 | 121 | usort( |
122 | 122 | $updates, |
123 | - function (Update $a, Update $b) { |
|
123 | + function(Update $a, Update $b) { |
|
124 | 124 | return Comparator::isGreaterThan( |
125 | 125 | $a->getVersion(), |
126 | 126 | $b->getVersion(), |
@@ -88,7 +88,7 @@ |
||
88 | 88 | ->setTimeout((null === $config['timeout']) ? null : (float) $config['timeout']) |
89 | 89 | ->setIdleTimeout((null === $config['idle_timeout']) ? null : (float) $config['idle_timeout']); |
90 | 90 | |
91 | - $callback = function ($type, $buffer) use ($config, $host) { |
|
91 | + $callback = function($type, $buffer) use ($config, $host) { |
|
92 | 92 | $this->logger->printBuffer($host, $type, $buffer); |
93 | 93 | $this->pop->callback($host, boolval($config['real_time_output']))($type, $buffer); |
94 | 94 | }; |