Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3fc97ce

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: refactored code
2 parentsa3c3c44 +b4364aa commit3fc97ce

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

‎src/Symfony/Component/Console/Helper/QuestionHelper.php‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,19 +328,17 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
328328

329329
privatefunctionmostRecentlyEnteredValue($entered)
330330
{
331-
$tempEntered =$entered;
332-
333331
// Determine the most recent value that the user entered
334-
if (false!==strpos($entered,',')) {
335-
$choices =explode(',',$entered);
336-
$lastChoice =trim($choices[\count($choices) -1]);
332+
if (false===strpos($entered,',')) {
333+
return$entered;
334+
}
337335

338-
if (\strlen($lastChoice) >0) {
339-
$tempEntered =$lastChoice;
340-
}
336+
$choices =explode(',',$entered);
337+
if (\strlen($lastChoice =trim($choices[\count($choices) -1])) >0) {
338+
return$lastChoice;
341339
}
342340

343-
return$tempEntered;
341+
return$entered;
344342
}
345343

346344
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp