@@ -86,19 +86,19 @@ discard block |
||
86 | 86 | new InputOption('file', 'f', InputOption::VALUE_REQUIRED, 'Recipe file path'), |
87 | 87 | ); |
88 | 88 | |
89 | - $this['console'] = function () use ($console) { |
|
89 | + $this['console'] = function() use ($console) { |
|
90 | 90 | return $console; |
91 | 91 | }; |
92 | - $this['input'] = function () { |
|
92 | + $this['input'] = function() { |
|
93 | 93 | throw new \RuntimeException('Uninitialized "input" in Deployer container.'); |
94 | 94 | }; |
95 | - $this['output'] = function () { |
|
95 | + $this['output'] = function() { |
|
96 | 96 | throw new \RuntimeException('Uninitialized "output" in Deployer container.'); |
97 | 97 | }; |
98 | - $this['inputDefinition'] = function () { |
|
98 | + $this['inputDefinition'] = function() { |
|
99 | 99 | return new InputDefinition(); |
100 | 100 | }; |
101 | - $this['questionHelper'] = function () { |
|
101 | + $this['questionHelper'] = function() { |
|
102 | 102 | return $this->getHelper('question'); |
103 | 103 | }; |
104 | 104 | |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | * Config * |
107 | 107 | ******************************/ |
108 | 108 | |
109 | - $this['config'] = function () { |
|
109 | + $this['config'] = function() { |
|
110 | 110 | return new Configuration(); |
111 | 111 | }; |
112 | 112 | // -l act as if it had been invoked as a login shell (i.e. source ~/.profile file) |
113 | 113 | // -s commands are read from the standard input (no arguments should remain after this option) |
114 | - $this->config['shell'] = function () { |
|
114 | + $this->config['shell'] = function() { |
|
115 | 115 | if (currentHost() instanceof Localhost) { |
116 | 116 | return 'bash -s'; // Non-login shell for localhost. |
117 | 117 | } |
@@ -124,37 +124,37 @@ discard block |
||
124 | 124 | * Core * |
125 | 125 | ******************************/ |
126 | 126 | |
127 | - $this['pop'] = function ($c) { |
|
127 | + $this['pop'] = function($c) { |
|
128 | 128 | return new Printer($c['output']); |
129 | 129 | }; |
130 | - $this['sshClient'] = function ($c) { |
|
130 | + $this['sshClient'] = function($c) { |
|
131 | 131 | return new SshClient($c['output'], $c['pop'], $c['logger']); |
132 | 132 | }; |
133 | - $this['rsync'] = function ($c) { |
|
133 | + $this['rsync'] = function($c) { |
|
134 | 134 | return new Rsync($c['pop'], $c['output']); |
135 | 135 | }; |
136 | - $this['processRunner'] = function ($c) { |
|
136 | + $this['processRunner'] = function($c) { |
|
137 | 137 | return new ProcessRunner($c['pop'], $c['logger']); |
138 | 138 | }; |
139 | - $this['tasks'] = function () { |
|
139 | + $this['tasks'] = function() { |
|
140 | 140 | return new TaskCollection(); |
141 | 141 | }; |
142 | - $this['hosts'] = function () { |
|
142 | + $this['hosts'] = function() { |
|
143 | 143 | return new HostCollection(); |
144 | 144 | }; |
145 | - $this['scriptManager'] = function ($c) { |
|
145 | + $this['scriptManager'] = function($c) { |
|
146 | 146 | return new ScriptManager($c['tasks']); |
147 | 147 | }; |
148 | - $this['selector'] = function ($c) { |
|
148 | + $this['selector'] = function($c) { |
|
149 | 149 | return new Selector($c['hosts']); |
150 | 150 | }; |
151 | - $this['fail'] = function () { |
|
151 | + $this['fail'] = function() { |
|
152 | 152 | return new Collection(); |
153 | 153 | }; |
154 | - $this['messenger'] = function ($c) { |
|
154 | + $this['messenger'] = function($c) { |
|
155 | 155 | return new Messenger($c['input'], $c['output'], $c['logger']); |
156 | 156 | }; |
157 | - $this['master'] = function ($c) { |
|
157 | + $this['master'] = function($c) { |
|
158 | 158 | return new Master( |
159 | 159 | $c['hosts'], |
160 | 160 | $c['input'], |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $c['messenger'], |
163 | 163 | ); |
164 | 164 | }; |
165 | - $this['importer'] = function () { |
|
165 | + $this['importer'] = function() { |
|
166 | 166 | return new Importer(); |
167 | 167 | }; |
168 | 168 | |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | * Logger * |
171 | 171 | ******************************/ |
172 | 172 | |
173 | - $this['log_handler'] = function () { |
|
173 | + $this['log_handler'] = function() { |
|
174 | 174 | return !empty($this['log']) |
175 | 175 | ? new FileHandler($this['log']) |
176 | 176 | : new NullHandler(); |
177 | 177 | }; |
178 | - $this['logger'] = function () { |
|
178 | + $this['logger'] = function() { |
|
179 | 179 | return new Logger($this['log_handler']); |
180 | 180 | }; |
181 | 181 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $output->writeln([ |
306 | 306 | "<fg=white;bg=red> {$class} </> <comment>in {$file} on line {$exception->getLine()}:</>", |
307 | 307 | "", |
308 | - implode("\n", array_map(function ($line) { |
|
308 | + implode("\n", array_map(function($line) { |
|
309 | 309 | return " " . $line; |
310 | 310 | }, explode("\n", $exception->getMessage()))), |
311 | 311 | "", |