Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/console/Helper/QuestionHelper.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | 1fec387a4317 |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
122 * @param OutputInterface $output | 122 * @param OutputInterface $output |
123 * @param Question $question | 123 * @param Question $question |
124 * | 124 * |
125 * @return bool|mixed|null|string | 125 * @return bool|mixed|null|string |
126 * | 126 * |
127 * @throws \Exception | 127 * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden |
128 * @throws \RuntimeException | |
129 */ | 128 */ |
130 private function doAsk(OutputInterface $output, Question $question) | 129 private function doAsk(OutputInterface $output, Question $question) |
131 { | 130 { |
132 $this->writePrompt($output, $question); | 131 $this->writePrompt($output, $question); |
133 | 132 |
137 if (null === $autocomplete || !$this->hasSttyAvailable()) { | 136 if (null === $autocomplete || !$this->hasSttyAvailable()) { |
138 $ret = false; | 137 $ret = false; |
139 if ($question->isHidden()) { | 138 if ($question->isHidden()) { |
140 try { | 139 try { |
141 $ret = trim($this->getHiddenResponse($output, $inputStream)); | 140 $ret = trim($this->getHiddenResponse($output, $inputStream)); |
142 } catch (\RuntimeException $e) { | 141 } catch (RuntimeException $e) { |
143 if (!$question->isHiddenFallback()) { | 142 if (!$question->isHiddenFallback()) { |
144 throw $e; | 143 throw $e; |
145 } | 144 } |
146 } | 145 } |
147 } | 146 } |