@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | ->setDefault($serviceName) |
74 | 74 | ->compulsory() |
75 | 75 | ->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.') |
76 | - ->setValidator(function (string $value) { |
|
76 | + ->setValidator(function(string $value) { |
|
77 | 77 | $value = trim($value); |
78 | 78 | if (!\preg_match('/^[a-zA-Z0-9_.-]+$/', $value)) { |
79 | - throw new \InvalidArgumentException('Invalid service name "'.$value.'". Service names can contain alphanumeric characters, and "_", ".", "-".'); |
|
79 | + throw new \InvalidArgumentException('Invalid service name "' . $value . '". Service names can contain alphanumeric characters, and "_", ".", "-".'); |
|
80 | 80 | } |
81 | 81 | return $value; |
82 | 82 | }) |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $default = $proposedTags[0] ?? null; |
104 | 104 | $this->output->writeln("Please choose your $applicationName version."); |
105 | 105 | if (!empty($proposedTags)) { |
106 | - $this->output->writeln('Possible values include: <info>'.\implode('</info>, <info>', $proposedTags).'</info>'); |
|
106 | + $this->output->writeln('Possible values include: <info>' . \implode('</info>, <info>', $proposedTags) . '</info>'); |
|
107 | 107 | } |
108 | 108 | $this->output->writeln('Enter "v" to view all available versions, "?" for help'); |
109 | 109 | $question = new Question( |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | $default |
112 | 112 | ); |
113 | 113 | $question->setAutocompleterValues($availableVersions); |
114 | - $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) { |
|
114 | + $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) { |
|
115 | 115 | $value = trim($value); |
116 | 116 | |
117 | 117 | if ($value === 'v') { |
118 | - $this->output->writeln('Available versions: <info>'.\implode('</info>, <info>', $availableVersions).'</info>'); |
|
118 | + $this->output->writeln('Available versions: <info>' . \implode('</info>, <info>', $availableVersions) . '</info>'); |
|
119 | 119 | return 'v'; |
120 | 120 | } |
121 | 121 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | if ($this->default) { |
95 | 95 | if (!$this->yesNoQuestion) { |
96 | - $text .= ' ['.$this->default.']'; |
|
96 | + $text .= ' [' . $this->default . ']'; |
|
97 | 97 | } elseif ($this->default === 'y') { |
98 | 98 | $text .= ' [Y/n]'; |
99 | 99 | } elseif ($this->default === 'n') { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $validator = $this->validator; |
110 | 110 | |
111 | 111 | if ($this->yesNoQuestion) { |
112 | - $validator = function (?string $response) use ($validator) { |
|
112 | + $validator = function(?string $response) use ($validator) { |
|
113 | 113 | $response = trim(\strtolower($response)); |
114 | 114 | if (!\in_array($response, ['y', 'n', 'yes', 'no'])) { |
115 | 115 | throw new \InvalidArgumentException('Answer must be "y" or "n"'); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | if ($this->helpText !== null) { |
123 | - $validator = function (?string $response) use ($validator) { |
|
123 | + $validator = function(?string $response) use ($validator) { |
|
124 | 124 | if (trim($response) === '?') { |
125 | 125 | $this->output->writeln($this->helpText ?: ''); |
126 | 126 | return '?'; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | if ($this->compulsory) { |
133 | - $validator = function (?string $response) use ($validator) { |
|
133 | + $validator = function(?string $response) use ($validator) { |
|
134 | 134 | if (trim($response) === '') { |
135 | 135 | throw new \InvalidArgumentException('This field is compulsory.'); |
136 | 136 | } |