@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | try { |
66 | 66 | $this->executeCommand($input, $output); |
67 | 67 | } catch (BoilerException $exception) { |
68 | - $output->write('<error>' . $exception->getMessage() . '</error>'); |
|
68 | + $output->write('<error>'.$exception->getMessage().'</error>'); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return Yaml::parseFile($path); |
109 | 109 | } catch (ParseException $exception) { |
110 | 110 | throw new BoilerException( |
111 | - 'Template file located at `' . $path . '` could not be parsed', |
|
111 | + 'Template file located at `'.$path.'` could not be parsed', |
|
112 | 112 | $exception->getCode(), |
113 | 113 | $exception |
114 | 114 | ); |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | throw new BoilerException('Include function must be an array.'); |
134 | 134 | } |
135 | 135 | |
136 | - return array_map(function ($fileName) { |
|
136 | + return array_map(function($fileName) { |
|
137 | 137 | $templateFile = $this->findTemplateFile($fileName); |
138 | 138 | if ($templateFile === null) { |
139 | - throw new BoilerException('Included file `' . $fileName . '` does not exists'); |
|
139 | + throw new BoilerException('Included file `'.$fileName.'` does not exists'); |
|
140 | 140 | } |
141 | 141 | $template = $this->parseTemplateFile($templateFile->getPathname()); |
142 | 142 | |
143 | - if (! $template) { |
|
144 | - throw new BoilerException('Included file `' . $fileName . '` cannot be parsed'); |
|
143 | + if (!$template) { |
|
144 | + throw new BoilerException('Included file `'.$fileName.'` cannot be parsed'); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | return $template; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $templateFile = $this->findTemplateFile($templateFileName); |
199 | 199 | |
200 | 200 | if (is_null($templateFile)) { |
201 | - throw new BoilerException('No template found with name ' . $templateFileName); |
|
201 | + throw new BoilerException('No template found with name '.$templateFileName); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | $template = $this->parseTemplateFile($templateFile->getPathname()); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | ]; |
229 | 229 | |
230 | 230 | foreach ($template['steps'] as $step) { |
231 | - $output->writeln('<info>Executing ' . $template[$step]['name'] . '</info>'); |
|
231 | + $output->writeln('<info>Executing '.$template[$step]['name'].'</info>'); |
|
232 | 232 | $scripts = is_array($template[$step]['script']) ? $template[$step]['script'] : [$template[$step]['script']]; |
233 | 233 | foreach ($scripts as $script) { |
234 | 234 | $script = str_replace(array_keys($variables), array_values($variables), $script); |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | throw new BoilerException('Folder already exists'); |
264 | 264 | } |
265 | 265 | |
266 | - $output->writeln('<info>Installing ' . $templateName . '</info>'); |
|
266 | + $output->writeln('<info>Installing '.$templateName.'</info>'); |
|
267 | 267 | $this->variables['template_name'] = $templateName; |
268 | 268 | |
269 | 269 | mkdir($directoryName); |
@@ -284,15 +284,15 @@ discard block |
||
284 | 284 | $steps = $template['steps']; |
285 | 285 | foreach ($steps as $step) { |
286 | 286 | if (!array_key_exists($step, $template)) { |
287 | - throw new BoilerException('The step `' . $step . '` does not exists.'); |
|
287 | + throw new BoilerException('The step `'.$step.'` does not exists.'); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | if (!array_key_exists('name', $template[$step])) { |
291 | - throw new BoilerException('No `name` set for the step `' . $step . '`'); |
|
291 | + throw new BoilerException('No `name` set for the step `'.$step.'`'); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | if (!array_key_exists('script', $template[$step])) { |
295 | - throw new BoilerException('No `script` set for the step `' . $step . '`'); |
|
295 | + throw new BoilerException('No `script` set for the step `'.$step.'`'); |
|
296 | 296 | } |
297 | 297 | } |
298 | 298 | } |