Completed
Push — master ( ada55e...22327f )
by Julien
11s
created
src/Helper/AentHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $question = $this->question('Environment name')
103 103
             ->compulsory()
104
-            ->setValidator(function (string $value) {
104
+            ->setValidator(function(string $value) {
105 105
                 $value = trim($value);
106 106
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
107 107
                     throw new \InvalidArgumentException('Invalid environment name "' . $value . '". Environment names can contain alphanumeric characters, and "_", ".", "-".');
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         }
191 191
         $environmentsStr = [];
192 192
         foreach ($environments as $env) {
193
-            $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type '. $env[Metadata::ENV_TYPE_KEY]  .')';
193
+            $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type ' . $env[Metadata::ENV_TYPE_KEY] . ')';
194 194
         }
195 195
         $chosen = $this->choiceQuestion('Environments', $environmentsStr)
196 196
             ->askWithMultipleChoices();
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             $default
224 224
         );
225 225
         $question->setAutocompleterValues($availableVersions);
226
-        $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) {
226
+        $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) {
227 227
             $value = trim($value);
228 228
 
229 229
             if ($value === 'v') {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             ->setDefault($serviceName)
259 259
             ->compulsory()
260 260
             ->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.')
261
-            ->setValidator(function (string $value) {
261
+            ->setValidator(function(string $value) {
262 262
                 $value = trim($value);
263 263
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
264 264
                     throw new \InvalidArgumentException('Invalid service name "' . $value . '". Service names can contain alphanumeric characters, and "_", ".", "-".');
Please login to merge, or discard this patch.
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
             $this->spacer();
142 142
             if ($multiselect) {
Please login to merge, or discard this patch.