Completed
Push — master ( 870f7c...5e10f3 )
by Jonas
03:20
created
src/RunCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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));
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $this->paths = $this->configuration->getPaths();
112 112
 
113
-        if (empty($this->paths)) {
113
+        if (empty( $this->paths )) {
114 114
             throw new BoilerException('No paths configured');
115 115
         }
116 116
 
117 117
         $templateFileName = $input->getArgument('template');
118 118
 
119
-        if (empty($templateFileName)) {
119
+        if (empty( $templateFileName )) {
120 120
             throw new BoilerException('No template given.');
121 121
         } elseif (is_array($templateFileName)) {
122 122
             throw new BoilerException('Only one template is allowed.');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             throw new BoilerException('Folder already exists');
132 132
         }
133 133
 
134
-        $output->writeln('<info>Installing ' . $templateName . '</info>');
134
+        $output->writeln('<info>Installing '.$templateName.'</info>');
135 135
         $this->variables['template_name'] = $templateName;
136 136
 
137 137
         mkdir($directoryName);
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $finder = new Finder();
153 153
         foreach ($this->paths as $directory) {
154
-            $templateDir = $directory . '/' . $name;
154
+            $templateDir = $directory.'/'.$name;
155 155
             if (!is_dir($templateDir)) {
156 156
                 continue;
157 157
             }
158 158
 
159 159
             $finder->in($templateDir)
160
-                ->notName($name . '.yml')
160
+                ->notName($name.'.yml')
161 161
                 ->sortByType()
162 162
                 ->ignoreDotFiles(false);
163 163
 
Please login to merge, or discard this patch.
src/GetPathsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         $paths = $this->configuration->getPaths();
36 36
 
37
-        if (empty($paths)) {
37
+        if (empty( $paths )) {
38 38
             $output->writeln('<info>No paths set...</info>');
39 39
 
40 40
             return;
Please login to merge, or discard this patch.
src/Helpers/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
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
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $arrayKey = array_search($path, $this->config['paths']);
127 127
         if (is_array($this->config['paths']) && $arrayKey !== false) {
128
-            unset($this->config['paths'][$arrayKey]);
128
+            unset( $this->config['paths'][$arrayKey] );
129 129
             $this->saveConfigurationFile();
130 130
 
131 131
             return true;
Please login to merge, or discard this patch.
src/Helpers/Template.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             );
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 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 198
             if (!$template) {
199
-                throw new BoilerException('Included file `' . $fileName . '` cannot be parsed');
199
+                throw new BoilerException('Included file `'.$fileName.'` cannot be parsed');
200 200
             }
201 201
 
202 202
             return $template;
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
      */
230 230
     protected function validateTemplate(array $template): void
231 231
     {
232
-        if (!array_key_exists('name', $template) || empty($template['name'])) {
232
+        if (!array_key_exists('name', $template) || empty( $template['name'] )) {
233 233
             throw new BoilerException('There\'s no name defined in the template');
234 234
         }
235 235
 
236
-        if (!array_key_exists('steps', $template) || !is_array($template['steps']) || empty($template['steps'])) {
236
+        if (!array_key_exists('steps', $template) || !is_array($template['steps']) || empty( $template['steps'] )) {
237 237
             throw new BoilerException('There are no steps defined in the template');
238 238
         }
239 239
 
@@ -252,15 +252,15 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/RemovePathCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             throw new BoilerException('Only one directory is allowed.');
39 39
         }
40 40
 
41
-        if (empty($directory)) {
41
+        if (empty( $directory )) {
42 42
             $directory = getcwd();
43 43
 
44 44
             if ($directory === false) {
Please login to merge, or discard this patch.
src/SetupPathCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             throw new BoilerException('Only one directory is allowed.');
39 39
         }
40 40
 
41
-        if (empty($directory)) {
41
+        if (empty( $directory )) {
42 42
             $directory = getcwd();
43 43
 
44 44
             if ($directory === false) {
Please login to merge, or discard this patch.