Completed
Pull Request — master (#56)
by Jindun
04:05
created
src/Helper/AentHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $question = $this->question('Environment name')
101 101
             ->compulsory()
102
-            ->setValidator(function (string $value) {
102
+            ->setValidator(function(string $value) {
103 103
                 $value = trim($value);
104 104
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
105 105
                     throw new \InvalidArgumentException('Invalid environment name "' . $value . '". Environment names can contain alphanumeric characters, and "_", ".", "-".');
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         }
185 185
         $environmentsStr = [];
186 186
         foreach ($environments as $env) {
187
-            $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type '. $env[Metadata::ENV_TYPE_KEY]  .')';
187
+            $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type ' . $env[Metadata::ENV_TYPE_KEY] . ')';
188 188
         }
189 189
         $chosen = $this->choiceQuestion('Environments', $environmentsStr, false)
190 190
             ->askWithMultipleChoices();
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             $default
217 217
         );
218 218
         $question->setAutocompleterValues($availableVersions);
219
-        $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) {
219
+        $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) {
220 220
             $value = trim($value);
221 221
 
222 222
             if ($value === 'v') {
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
         return $version;
246 246
     }
247 247
 
248
-    public function askForServiceName(string $serviceName, string $applicationName = '', $printAnswer=true): string
248
+    public function askForServiceName(string $serviceName, string $applicationName = '', $printAnswer = true): string
249 249
     {
250 250
         $answer = $this->question("$applicationName service name", $printAnswer)
251 251
             ->setDefault($serviceName)
252 252
             ->compulsory()
253 253
             ->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.')
254
-            ->setValidator(function (string $value) {
254
+            ->setValidator(function(string $value) {
255 255
                 $value = trim($value);
256 256
                 if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) {
257 257
                     throw new \InvalidArgumentException('Invalid service name "' . $value . '". Service names can contain alphanumeric characters, and "_", ".", "-".');
Please login to merge, or discard this patch.