Completed
Pull Request — master (#79)
by Jan Philipp
01:32
created
src/Application/ApplicationFactory.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -135,6 +135,9 @@
 block discarded – undo
135 135
         return $reformattedParams;
136 136
     }
137 137
 
138
+    /**
139
+     * @param string $directory
140
+     */
138 141
     public function getConfigFiles($directory): array
139 142
     {
140 143
         return  (new ConfigFileFinder())->discoverFiles($directory);
Please login to merge, or discard this patch.
src/ScriptRuntime/ProcessExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
      */
136 136
     protected function runProcess(Process $process)
137 137
     {
138
-        $process->run(function ($type, $response) {
138
+        $process->run(function($type, $response) {
139 139
             if (Process::ERR === $type) {
140 140
                 $this->logger->err($response);
141 141
             } else {
Please login to merge, or discard this patch.
src/Listing/ScriptFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $scripts = $this->getAllScripts();
80 80
 
81
-        return array_filter($scripts, function ($key) use ($query) {
81
+        return array_filter($scripts, function($key) use ($query) {
82 82
             return strpos($key, $query) > -1 || levenshtein($key, $query) < 3;
83 83
         }, ARRAY_FILTER_USE_KEY);
84 84
     }
Please login to merge, or discard this patch.
src/Application/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $countConfigFiles = count($configFiles);
212 212
         for ($i = 0; $i < $countConfigFiles; $i++) {
213
-            $configFiles[$i] = str_replace($this->rootDirectory."/", "", $configFiles[$i]);
213
+            $configFiles[$i] = str_replace($this->rootDirectory . "/", "", $configFiles[$i]);
214 214
         }
215 215
 
216 216
         if (count($configFiles) == 1) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         $scripts = $scriptFinder->getAllScripts();
248 248
 
249
-        $commands = array_map(function (Script $script) {
249
+        $commands = array_map(function(Script $script) {
250 250
             return $script->getName();
251 251
         }, $scripts);
252 252
 
Please login to merge, or discard this patch.
src/Config/ConfigBuilder.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -70,6 +70,10 @@  discard block
 block discarded – undo
70 70
         return $this;
71 71
     }
72 72
 
73
+    /**
74
+     * @param string $key
75
+     * @param string $value
76
+     */
73 77
     public function setDynamicVariable($key, $value): ConfigBuilder
74 78
     {
75 79
         $this->currentDynamicVariables[$key] = $value;
@@ -86,6 +90,10 @@  discard block
 block discarded – undo
86 90
         return $this;
87 91
     }
88 92
 
93
+    /**
94
+     * @param string $key
95
+     * @param string $value
96
+     */
89 97
     public function setConstVariable($key, $value): ConfigBuilder
90 98
     {
91 99
         $this->currentConstants[$key] = $value;
Please login to merge, or discard this patch.
src/Config/XmlConfigFileLoader.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     /**
90 90
      * @param string $file
91
-     * @param array $pshConfigNode
91
+     * @param DOMElement $pshConfigNode
92 92
      */
93 93
     private function setConfigData(string $file, DOMElement $pshConfigNode)
94 94
     {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     /**
165 165
      * @param string $file
166
-     * @param array $pshConfigNodes
166
+     * @param DOMElement $pshConfigNodes
167 167
      * @return array
168 168
      */
169 169
     private function extractTemplates(string $file, DOMElement $pshConfigNodes): array
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $pathNodes = $this->extractNodes(self::NODE_PATH, $pshConfigNode);
158 158
 
159
-        return array_map(function (DOMElement $path) use ($file) {
159
+        return array_map(function(DOMElement $path) use ($file) {
160 160
             return $this->fixPath($this->applicationRootDirectory, $path->nodeValue, $file);
161 161
         }, $pathNodes);
162 162
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $templates = $this->extractNodes(self::NODE_TEMPLATE, $pshConfigNodes);
172 172
 
173
-        return array_map(function (DOMElement $template) use ($file) {
173
+        return array_map(function(DOMElement $template) use ($file) {
174 174
             return [
175 175
                 'source' => $this->fixPath(
176 176
                     $this->applicationRootDirectory,
Please login to merge, or discard this patch.
src/Config/YamlConfigFileLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $paths = $this->extractData(self::KEY_COMMAND_PATHS, $rawConfigData, []);
145 145
 
146
-        return array_map(function ($path) use ($file) {
146
+        return array_map(function($path) use ($file) {
147 147
             return $this->fixPath($this->applicationRootDirectory, $path, $file);
148 148
         }, $paths);
149 149
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $templates = $this->extractData(self::KEY_TEMPLATES, $rawConfigData, []);
159 159
 
160
-        return array_map(function ($template) use ($file) {
160
+        return array_map(function($template) use ($file) {
161 161
             $template['source'] = $this->fixPath($this->applicationRootDirectory, $template['source'], $file);
162 162
             $template['destination'] = $this->makeAbsolutePath($file, $template['destination']);
163 163
 
Please login to merge, or discard this patch.
src/Config/ConfigFileFinder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,19 +48,19 @@
 block discarded – undo
48 48
             return $globResult;
49 49
         }
50 50
 
51
-        $overrideFiles = array_filter($globResult, function (string $file) {
51
+        $overrideFiles = array_filter($globResult, function(string $file) {
52 52
             $extension = pathinfo($file, PATHINFO_EXTENSION);
53 53
 
54 54
             return $extension === 'override';
55 55
         });
56 56
 
57
-        $distFiles = array_filter($globResult, function (string $file) {
57
+        $distFiles = array_filter($globResult, function(string $file) {
58 58
             $extension = pathinfo($file, PATHINFO_EXTENSION);
59 59
 
60 60
             return $extension === 'dist';
61 61
         });
62 62
 
63
-        $configFiles = array_filter($globResult, function (string $file) {
63
+        $configFiles = array_filter($globResult, function(string $file) {
64 64
             $extension = pathinfo($file, PATHINFO_EXTENSION);
65 65
 
66 66
             return $extension !== 'override' && $extension !== 'dist';
Please login to merge, or discard this patch.