Passed
Pull Request — master (#44)
by Jindun
04:54
created
src/Helper/ChoiceQuestion.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
         $choices = $this->choices;
87 87
         $errorMessage = 'Value "%s" is invalid';
88 88
         $multiselect = $this->multiselect;
89
-        $isAssoc = (bool)count(array_filter(array_keys($this->choices), '\is_string'));
89
+        $isAssoc = (bool) count(array_filter(array_keys($this->choices), '\is_string'));
90 90
 
91
-        return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) {
91
+        return function($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) {
92 92
 
93 93
             // Collapse all spaces.
94 94
             $selectedChoices = str_replace(' ', '', $selected);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 if (false === $result) {
137 137
                     throw new InvalidArgumentException(sprintf($errorMessage, $value));
138 138
                 }
139
-                $multiselectChoices[] = (string)$result;
139
+                $multiselectChoices[] = (string) $result;
140 140
             }
141 141
 
142 142
             if ($multiselect) {
Please login to merge, or discard this patch.
src/Helper/AentHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $envName = $this->question('Environment name')
91 91
             ->compulsory()
92
-            ->setValidator(function (string $value) {
92
+            ->setValidator(function(string $value) {
93 93
                 $value = trim($value);
94 94
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
95 95
                     throw new \InvalidArgumentException('Invalid environment name "' . $value . '". Environment names can contain alphanumeric characters, and "_", ".", "-".');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             ->askWithMultipleChoices();
160 160
         $this->output->writeln('<info>Environments: ' . implode($choosen, ', ') . '</info>');
161 161
         $this->spacer();
162
-        return array_filter($environments, function (string $key) use ($choosen) {
162
+        return array_filter($environments, function(string $key) use ($choosen) {
163 163
             return isset($choosen[$key]);
164 164
         }, ARRAY_FILTER_USE_KEY);
165 165
     }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             $default
183 183
         );
184 184
         $question->setAutocompleterValues($availableVersions);
185
-        $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) {
185
+        $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) {
186 186
             $value = trim($value);
187 187
 
188 188
             if ($value === 'v') {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             ->setDefault($serviceName)
218 218
             ->compulsory()
219 219
             ->setHelpText('The "service name" is used as an identifier for the container you are creating. It is also bound in Docker internal network DNS and can be used from other containers to reference your container.')
220
-            ->setValidator(function (string $value) {
220
+            ->setValidator(function(string $value) {
221 221
                 $value = trim($value);
222 222
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
223 223
                     throw new \InvalidArgumentException('Invalid service name "' . $value . '". Service names can contain alphanumeric characters, and "_", ".", "-".');
Please login to merge, or discard this patch.