@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | $command = array_values(array_filter( |
75 | 75 | array_merge(['rsync', $flags], $options, $source, [$destination]), |
76 | - function (string $value) { |
|
76 | + function(string $value) { |
|
77 | 77 | return $value !== ''; |
78 | 78 | }, |
79 | 79 | )); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $fullOutput = ''; |
98 | 98 | |
99 | - $callback = function ($type, $buffer) use ($host, $progressBar, &$fullOutput) { |
|
99 | + $callback = function($type, $buffer) use ($host, $progressBar, &$fullOutput) { |
|
100 | 100 | $fullOutput .= $buffer; |
101 | 101 | if ($progressBar) { |
102 | 102 | foreach (explode("\n", $buffer) as $line) { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | public function callback(Host $host): \Closure |
33 | 33 | { |
34 | - return function ($type, $buffer) use ($host) { |
|
34 | + return function($type, $buffer) use ($host) { |
|
35 | 35 | $this->printBuffer($host, $type, $buffer); |
36 | 36 | }; |
37 | 37 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $hosts = $this->selectHosts($input, $output); |
63 | 63 | $this->applyOverrides($hosts, $input->getOption('option')); |
64 | 64 | |
65 | - $task = new Task($command, function () use ($input, $command) { |
|
65 | + $task = new Task($command, function() use ($input, $command) { |
|
66 | 66 | if (has('current_path')) { |
67 | 67 | $path = get('current_path'); |
68 | 68 | if (test("[ -d $path ]")) { |
@@ -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 | } |
@@ -263,7 +263,7 @@ |
||
263 | 263 | |
264 | 264 | $factory = $this->values[$id]; |
265 | 265 | |
266 | - $extended = function ($c) use ($callable, $factory) { |
|
266 | + $extended = function($c) use ($callable, $factory) { |
|
267 | 267 | return $callable($factory($c), $c); |
268 | 268 | }; |
269 | 269 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | if (empty($params)) { |
55 | 55 | $params = "| Argument | Type | Comment |\n|---|---|---|\n"; |
56 | 56 | } |
57 | - $type = implode(' or ', array_map(function ($t) { |
|
57 | + $type = implode(' or ', array_map(function($t) { |
|
58 | 58 | $t = trim($t, ' '); |
59 | 59 | return "`$t`"; |
60 | 60 | }, explode('|', $matches['type']))); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | set('workplace_edit_post', false); |
76 | 76 | |
77 | 77 | desc('Notifies Workplace'); |
78 | -task('workplace:notify', function () { |
|
78 | +task('workplace:notify', function() { |
|
79 | 79 | if (!get('workplace_webhook', false)) { |
80 | 80 | return; |
81 | 81 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | ->hidden(); |
100 | 100 | |
101 | 101 | desc('Notifies Workplace about deploy finish'); |
102 | -task('workplace:notify:success', function () { |
|
102 | +task('workplace:notify:success', function() { |
|
103 | 103 | if (!get('workplace_webhook', false)) { |
104 | 104 | return; |
105 | 105 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ->hidden(); |
111 | 111 | |
112 | 112 | desc('Notifies Workplace about deploy failure'); |
113 | -task('workplace:notify:failure', function () { |
|
113 | +task('workplace:notify:failure', function() { |
|
114 | 114 | if (!get('workplace_webhook', false)) { |
115 | 115 | return; |
116 | 116 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | use Deployer\Utility\Httpie; |
25 | 25 | |
26 | 26 | desc('Notifies Raygun of deployment'); |
27 | -task('raygun:notify', function () { |
|
27 | +task('raygun:notify', function() { |
|
28 | 28 | $data = [ |
29 | 29 | 'apiKey' => get('raygun_api_key'), |
30 | 30 | 'version' => get('raygun_version'), |
@@ -20,22 +20,22 @@ |
||
20 | 20 | |
21 | 21 | use Deployer\Utility\Httpie; |
22 | 22 | |
23 | -set('newrelic_app_id', function () { |
|
23 | +set('newrelic_app_id', function() { |
|
24 | 24 | throw new \Exception('Please, configure "newrelic_app_id" parameter.'); |
25 | 25 | }); |
26 | 26 | |
27 | -set('newrelic_description', function () { |
|
27 | +set('newrelic_description', function() { |
|
28 | 28 | return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"'); |
29 | 29 | }); |
30 | 30 | |
31 | -set('newrelic_revision', function () { |
|
31 | +set('newrelic_revision', function() { |
|
32 | 32 | return runLocally('git log -n 1 --format="%h"'); |
33 | 33 | }); |
34 | 34 | |
35 | 35 | set('newrelic_endpoint', 'api.newrelic.com'); |
36 | 36 | |
37 | 37 | desc('Notifies New Relic of deployment'); |
38 | -task('newrelic:notify', function () { |
|
38 | +task('newrelic:notify', function() { |
|
39 | 39 | if (($appId = get('newrelic_app_id')) && ($apiKey = get('newrelic_api_key')) && ($endpoint = get('newrelic_endpoint'))) { |
40 | 40 | $data = [ |
41 | 41 | 'user' => get('user'), |