@@ -49,7 +49,7 @@ |
||
49 | 49 | $this->pop->command($host, $command); |
50 | 50 | |
51 | 51 | $terminalOutput = $this->pop->callback($host); |
52 | - $callback = function ($type, $buffer) use ($host, $terminalOutput) { |
|
52 | + $callback = function($type, $buffer) use ($host, $terminalOutput) { |
|
53 | 53 | $this->logger->printBuffer($host, $type, $buffer); |
54 | 54 | $terminalOutput($type, $buffer); |
55 | 55 | }; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->logger->log("[{$host->getAlias()}] run $command"); |
66 | 66 | |
67 | 67 | $terminalOutput = $this->pop->callback($host); |
68 | - $callback = function ($type, $buffer) use ($host, $terminalOutput) { |
|
68 | + $callback = function($type, $buffer) use ($host, $terminalOutput) { |
|
69 | 69 | $this->logger->printBuffer($host, $type, $buffer); |
70 | 70 | $terminalOutput($type, $buffer); |
71 | 71 | }; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | return -1; |
107 | 107 | } |
108 | 108 | |
109 | - $exitCode = (int)$match[1]; |
|
109 | + $exitCode = (int) $match[1]; |
|
110 | 110 | return $exitCode; |
111 | 111 | } |
112 | 112 | |
@@ -166,6 +166,6 @@ discard block |
||
166 | 166 | if ($this->output->isDebug()) { |
167 | 167 | $this->pop->printBuffer(Process::OUT, $host, $output); |
168 | 168 | } |
169 | - return (bool)preg_match('/Master running/', $output); |
|
169 | + return (bool) preg_match('/Master running/', $output); |
|
170 | 170 | } |
171 | 171 | } |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | $boolFlags = array_keys(array_filter($this->flags, 'is_null')); |
30 | 30 | |
31 | 31 | $valueFlags = array_filter($this->flags); |
32 | - $valueFlags = array_map(function ($key, $value) { |
|
32 | + $valueFlags = array_map(function($key, $value) { |
|
33 | 33 | return "$key $value"; |
34 | 34 | }, array_keys($valueFlags), $valueFlags); |
35 | 35 | |
36 | - $options = array_map(function ($key, $value) { |
|
36 | + $options = array_map(function($key, $value) { |
|
37 | 37 | return "-o $key=$value"; |
38 | 38 | }, array_keys($this->options), $this->options); |
39 | 39 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | private function buildFlagsFromArray($flags) |
158 | 158 | { |
159 | - $boolFlags = array_filter(array_map(function ($key, $value) { |
|
159 | + $boolFlags = array_filter(array_map(function($key, $value) { |
|
160 | 160 | if (is_int($key)) { |
161 | 161 | return $value; |
162 | 162 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return false; |
169 | 169 | }, array_keys($flags), $flags)); |
170 | 170 | |
171 | - $valueFlags = array_filter($flags, function ($key, $value) { |
|
171 | + $valueFlags = array_filter($flags, function($key, $value) { |
|
172 | 172 | return is_string($key) && is_string($value); |
173 | 173 | }, ARRAY_FILTER_USE_BOTH); |
174 | 174 |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | usort( |
126 | 126 | $updates, |
127 | - function (Update $a, Update $b) { |
|
127 | + function(Update $a, Update $b) { |
|
128 | 128 | return Comparator::isGreaterThan( |
129 | 129 | $a->getVersion(), |
130 | 130 | $b->getVersion() |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $this->getApplication()->getVersion(), |
100 | 100 | $this->disableUpgrade ?: (false === $input->getOption('upgrade')), |
101 | 101 | $input->getOption('pre') |
102 | - )){ |
|
102 | + )) { |
|
103 | 103 | $output->writeln('<info>Update successful!</info>'); |
104 | 104 | } else { |
105 | 105 | $output->writeln('<comment>Already up-to-date.</comment>'); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | - return count($ok) > 0 && array_all($ok, function ($value) { |
|
58 | + return count($ok) > 0 && array_all($ok, function($value) { |
|
59 | 59 | return $value; |
60 | 60 | }); |
61 | 61 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $deployer->hosts->set($aliases[0], $host); |
59 | 59 | return $host; |
60 | 60 | } else { |
61 | - $hosts = array_map(function ($hostname) use ($deployer) { |
|
61 | + $hosts = array_map(function($hostname) use ($deployer) { |
|
62 | 62 | $host = new Host($hostname); |
63 | 63 | $deployer->hosts->set($hostname, $host); |
64 | 64 | return $host; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $deployer->hosts->set($host->getAlias(), $host); |
82 | 82 | return $host; |
83 | 83 | } else { |
84 | - $hosts = array_map(function ($hostname) use ($deployer) { |
|
84 | + $hosts = array_map(function($hostname) use ($deployer) { |
|
85 | 85 | $host = new Localhost($hostname); |
86 | 86 | $deployer->hosts->set($host->getAlias(), $host); |
87 | 87 | return $host; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | */ |
290 | 290 | function run($command, $options = []) |
291 | 291 | { |
292 | - $run = function ($command, $options) { |
|
292 | + $run = function($command, $options) { |
|
293 | 293 | $host = Context::get()->getHost(); |
294 | 294 | |
295 | 295 | $command = parse($command); |
@@ -195,7 +195,7 @@ |
||
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
198 | - $prefix .= $startSymbol . '──'; |
|
198 | + $prefix .= $startSymbol . '──'; |
|
199 | 199 | |
200 | 200 | $this->output->writeln(sprintf('%s %s', $prefix, $treeItem['taskName'])); |
201 | 201 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $question->setErrorMessage('There is no "%s" host.'); |
65 | 65 | $answer = $helper->ask($input, $output, $question); |
66 | 66 | $answer = array_unique($answer); |
67 | - $hosts = $this->deployer->hosts->select(function (Host $host) use ($answer) { |
|
67 | + $hosts = $this->deployer->hosts->select(function(Host $host) use ($answer) { |
|
68 | 68 | return in_array($host->getAlias(), $answer, true); |
69 | 69 | }); |
70 | 70 | } |