Update vendored libs

This commit is contained in:
Frédéric Guillot
2020-06-08 22:46:20 -07:00
parent dfb0a2d915
commit f60e4a0c59
292 changed files with 9402 additions and 9487 deletions

View File

@@ -25,9 +25,9 @@ class ConfirmationQuestion extends Question
* @param bool $default The default answer to return, true or false
* @param string $trueAnswerRegex A regex to match the "yes" answer
*/
public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i')
{
parent::__construct($question, (bool) $default);
parent::__construct($question, $default);
$this->trueAnswerRegex = $trueAnswerRegex;
$this->setNormalizer($this->getDefaultNormalizer());
@@ -44,7 +44,7 @@ class ConfirmationQuestion extends Question
$regex = $this->trueAnswerRegex;
return function ($answer) use ($default, $regex) {
if (is_bool($answer)) {
if (\is_bool($answer)) {
return $answer;
}
@@ -53,7 +53,7 @@ class ConfirmationQuestion extends Question
return $answer && $answerIsTrue;
}
return !$answer || $answerIsTrue;
return '' === $answer || $answerIsTrue;
};
}
}