Skip to content

Commit 7cdfa54

Browse files
sensorariodamianopetrungaro
authored andcommitted
refactor(cli): leave single space between question and answer
1 parent 3cdaefe commit 7cdfa54

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/CommitCommand.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ private function createType(InputInterface $input, OutputInterface $output, Conf
129129
}
130130

131131
if ($typeValues !== [self::EXTRA_KEY_NAME]) {
132-
$choice = new ChoiceQuestion("<question>Select commit's type:</question>", $typeValues);
132+
$choice = new ChoiceQuestion("<question>Select commit's type:</question> ", $typeValues);
133133
$typeInput = $this->questionHelper->ask($input, $output, $choice);
134134
}
135135

136136
if (!isset($typeInput) || $typeInput === self::EXTRA_KEY_NAME) {
137-
$question = new Question("<question>Enter a custom commit's type:</question>", '');
137+
$question = new Question("<question>Enter a custom commit's type:</question> ", '');
138138
$typeInput = $this->questionHelper->ask($input, $output, $question);
139139
}
140140

@@ -156,12 +156,12 @@ private function createScope(InputInterface $input, OutputInterface $output, Con
156156
}
157157

158158
if ($scopeValues !== [self::EXTRA_KEY_NAME] && $scopeValues !== []) {
159-
$choice = new ChoiceQuestion("<question>Select commit's scope:</question>", $scopeValues);
159+
$choice = new ChoiceQuestion("<question>Select commit's scope:</question> ", $scopeValues);
160160
$scopeInput = $this->questionHelper->ask($input, $output, $choice);
161161
}
162162

163163
if (!isset($scopeInput) || $scopeInput === self::EXTRA_KEY_NAME) {
164-
$question = new Question("<question>Enter a custom commit's scope:</question>", '');
164+
$question = new Question("<question>Enter a custom commit's scope:</question> ", '');
165165
$scopeInput = $this->questionHelper->ask($input, $output, $question);
166166
}
167167

@@ -178,7 +178,7 @@ private function createDescription(InputInterface $input, OutputInterface $outpu
178178
$output->writeln('<comment>A description MUST immediately follow the type/scope prefix. The description is a short description of the changes</comment>');
179179
$output->writeln("<comment>Description length MUST be between {$configuration->minLengthDescription()} and {$configuration->maxLengthDescription()}</comment>");
180180

181-
$question = new Question("<question>Enter a custom commit's description:</question>", '');
181+
$question = new Question("<question>Enter a custom commit's description:</question> ", '');
182182
$descriptionInput = $this->questionHelper->ask($input, $output, $question);
183183
return Description::build($descriptionInput, $configuration);
184184
}
@@ -187,7 +187,7 @@ private function createBody(InputInterface $input, OutputInterface $output, Conf
187187
{
188188
$output->writeln('<comment>A longer commit body MAY be provided after the short description.</comment>');
189189

190-
$question = new Question("<question>Enter commit's body:</question>", '');
190+
$question = new Question("<question>Enter commit's body:</question> ", '');
191191
$bodyInput = $this->questionHelper->ask($input, $output, $question);
192192
return Body::build($bodyInput, $configuration);
193193
}
@@ -196,8 +196,8 @@ private function createFooter(InputInterface $input, OutputInterface $output, Co
196196
{
197197
$output->writeln('<comment>A footer MAY be provided one blank line after the body. The footer SHOULD contain additional meta-information about the changes(such as the issues it fixes, e.g., fixes #13, #5).</comment>');
198198

199-
$question = new Question("<question>Enter commit's footer:</question>", '');
199+
$question = new Question("<question>Enter commit's footer:</question> ", '');
200200
$footerInput = $this->questionHelper->ask($input, $output, $question);
201201
return Footer::build($footerInput, $configuration);
202202
}
203-
}
203+
}

0 commit comments

Comments
 (0)