@@ -86,9 +86,9 @@ discard block |
||
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 |
||
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 | if ($multiselect) { |
142 | 142 | if ($this->printAnswer) { |
@@ -99,7 +99,7 @@ discard block |
||
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 "_", ".", "-".'); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | $environmentsStr = []; |
188 | 188 | foreach ($environments as $env) { |
189 | - $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type '. $env[Metadata::ENV_TYPE_KEY] .')'; |
|
189 | + $environmentsStr[] = $env[Metadata::ENV_NAME_KEY] . ' (of type ' . $env[Metadata::ENV_TYPE_KEY] . ')'; |
|
190 | 190 | } |
191 | 191 | $chosen = $this->choiceQuestion('Environments', $environmentsStr, false) |
192 | 192 | ->askWithMultipleChoices(); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $default |
220 | 220 | ); |
221 | 221 | $question->setAutocompleterValues($availableVersions); |
222 | - $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) { |
|
222 | + $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) { |
|
223 | 223 | $value = trim($value); |
224 | 224 | |
225 | 225 | if ($value === 'v') { |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | ->setDefault($serviceName) |
255 | 255 | ->compulsory() |
256 | 256 | ->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.') |
257 | - ->setValidator(function (string $value) { |
|
257 | + ->setValidator(function(string $value) { |
|
258 | 258 | $value = trim($value); |
259 | 259 | if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) { |
260 | 260 | throw new \InvalidArgumentException('Invalid service name "' . $value . '". Service names can contain alphanumeric characters, and "_", ".", "-".'); |