| @@ -42,7 +42,7 @@ | ||
| 42 | 42 | $table = new Table($output); | 
| 43 | 43 | $table | 
| 44 | 44 | ->setHeaders(['Path']) | 
| 45 | -            ->setRows(array_map(function ($path) { | |
| 45 | +            ->setRows(array_map(function($path) { | |
| 46 | 46 | return [$path]; | 
| 47 | 47 | }, $paths)) | 
| 48 | 48 | ; | 
| @@ -46,8 +46,8 @@ | ||
| 46 | 46 | */ | 
| 47 | 47 | private function __construct() | 
| 48 | 48 |      { | 
| 49 | - $this->configLocation = $_SERVER['HOME'] . $this->configLocation; | |
| 50 | - $this->configFileLocation = $this->configLocation . '/' . $this->configFile; | |
| 49 | + $this->configLocation = $_SERVER['HOME'].$this->configLocation; | |
| 50 | + $this->configFileLocation = $this->configLocation.'/'.$this->configFile; | |
| 51 | 51 | $this->setupConfiguration(); | 
| 52 | 52 | } | 
| 53 | 53 | |
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | $templateFile = $this->getTemplate($templateFileName); | 
| 83 | 83 | |
| 84 | 84 |          if (is_null($templateFile)) { | 
| 85 | -            throw new BoilerException('No template found with name ' . $templateFileName); | |
| 85 | +            throw new BoilerException('No template found with name '.$templateFileName); | |
| 86 | 86 | } | 
| 87 | 87 | |
| 88 | 88 | $pathName = $templateFile->getPathname(); | 
| @@ -105,7 +105,7 @@ discard block | ||
| 105 | 105 | protected function getTemplate(string $name): ?SplFileInfo | 
| 106 | 106 |      { | 
| 107 | 107 |          foreach ($this->paths as $directory) { | 
| 108 | - $fileInDirectory = $this->findYamlFileInDirectory($name, $directory . '/' . $name); | |
| 108 | + $fileInDirectory = $this->findYamlFileInDirectory($name, $directory.'/'.$name); | |
| 109 | 109 | |
| 110 | 110 |              if (!is_null($fileInDirectory)) { | 
| 111 | 111 | return $fileInDirectory; | 
| @@ -136,7 +136,7 @@ discard block | ||
| 136 | 136 | return Yaml::parseFile($path); | 
| 137 | 137 |          } catch (ParseException $exception) { | 
| 138 | 138 | throw new BoilerException( | 
| 139 | - 'Template file located at `' . $path . '` could not be parsed', | |
| 139 | + 'Template file located at `'.$path.'` could not be parsed', | |
| 140 | 140 | $exception->getCode(), | 
| 141 | 141 | $exception | 
| 142 | 142 | ); | 
| @@ -188,15 +188,15 @@ discard block | ||
| 188 | 188 |              throw new BoilerException('Include function must be an array.'); | 
| 189 | 189 | } | 
| 190 | 190 | |
| 191 | -        return array_map(function ($fileName) { | |
| 191 | +        return array_map(function($fileName) { | |
| 192 | 192 | $templateFile = $this->getTemplate($fileName); | 
| 193 | 193 |              if ($templateFile === null) { | 
| 194 | -                throw new BoilerException('Included file `' . $fileName . '` does not exists'); | |
| 194 | +                throw new BoilerException('Included file `'.$fileName.'` does not exists'); | |
| 195 | 195 | } | 
| 196 | 196 | $template = $this->parseTemplateFile($templateFile->getPathname()); | 
| 197 | 197 | |
| 198 | -            if (! $template) { | |
| 199 | -                throw new BoilerException('Included file `' . $fileName . '` cannot be parsed'); | |
| 198 | +            if (!$template) { | |
| 199 | +                throw new BoilerException('Included file `'.$fileName.'` cannot be parsed'); | |
| 200 | 200 | } | 
| 201 | 201 | |
| 202 | 202 | return $template; | 
| @@ -252,15 +252,15 @@ discard block | ||
| 252 | 252 | $steps = $template['steps']; | 
| 253 | 253 |          foreach ($steps as $step) { | 
| 254 | 254 |              if (!array_key_exists($step, $template)) { | 
| 255 | -                throw new BoilerException('The step `' . $step . '` does not exists.'); | |
| 255 | +                throw new BoilerException('The step `'.$step.'` does not exists.'); | |
| 256 | 256 | } | 
| 257 | 257 | |
| 258 | 258 |              if (!array_key_exists('name', $template[$step])) { | 
| 259 | -                throw new BoilerException('No `name` set for the step `' . $step . '`'); | |
| 259 | +                throw new BoilerException('No `name` set for the step `'.$step.'`'); | |
| 260 | 260 | } | 
| 261 | 261 | |
| 262 | 262 |              if (!array_key_exists('script', $template[$step])) { | 
| 263 | -                throw new BoilerException('No `script` set for the step `' . $step . '`'); | |
| 263 | +                throw new BoilerException('No `script` set for the step `'.$step.'`'); | |
| 264 | 264 | } | 
| 265 | 265 | } | 
| 266 | 266 | } | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 |          try { | 
| 62 | 62 | $this->executeCommand($input, $output); | 
| 63 | 63 |          } catch (BoilerException $exception) { | 
| 64 | -            $output->write('<error>' . $exception->getMessage() . '</error>'); | |
| 64 | +            $output->write('<error>'.$exception->getMessage().'</error>'); | |
| 65 | 65 | } | 
| 66 | 66 | } | 
| 67 | 67 | |
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | protected function executeScripts(OutputInterface $output, array $template): void | 
| 91 | 91 |      { | 
| 92 | 92 |          foreach ($template['steps'] as $step) { | 
| 93 | -            $output->writeln('<info>Executing ' . $template[$step]['name'] . '</info>'); | |
| 93 | +            $output->writeln('<info>Executing '.$template[$step]['name'].'</info>'); | |
| 94 | 94 | $scripts = is_array($template[$step]['script']) ? $template[$step]['script'] : [$template[$step]['script']]; | 
| 95 | 95 |              foreach ($scripts as $script) { | 
| 96 | 96 | exec($this->replaceVariables($script)); | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 |              throw new BoilerException('Folder already exists'); | 
| 125 | 125 | } | 
| 126 | 126 | |
| 127 | -        $output->writeln('<info>Installing ' . $templateName . '</info>'); | |
| 127 | +        $output->writeln('<info>Installing '.$templateName.'</info>'); | |
| 128 | 128 | $this->variables['template_name'] = $templateName; | 
| 129 | 129 | |
| 130 | 130 | mkdir($directoryName); | 
| @@ -144,13 +144,13 @@ discard block | ||
| 144 | 144 |      { | 
| 145 | 145 | $finder = new Finder(); | 
| 146 | 146 |          foreach ($this->paths as $directory) { | 
| 147 | - $templateDir = $directory . '/' . $name; | |
| 148 | -            if (! is_dir($templateDir)) { | |
| 147 | + $templateDir = $directory.'/'.$name; | |
| 148 | +            if (!is_dir($templateDir)) { | |
| 149 | 149 | continue; | 
| 150 | 150 | } | 
| 151 | 151 | |
| 152 | 152 | $finder->in($templateDir) | 
| 153 | - ->notName($name . '.yml') | |
| 153 | + ->notName($name.'.yml') | |
| 154 | 154 | ->sortByType() | 
| 155 | 155 | ->ignoreDotFiles(false); | 
| 156 | 156 | |