代码规范化

This commit is contained in:
thinkphp
2016-08-09 10:35:06 +08:00
parent 8b147f6895
commit 131aaf1357
18 changed files with 60 additions and 75 deletions

View File

@@ -11,7 +11,6 @@
namespace think\console\helper\question;
class Confirmation extends Question
{
@@ -25,7 +24,7 @@ class Confirmation extends Question
*/
public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
{
parent::__construct($question, (bool)$default);
parent::__construct($question, (bool) $default);
$this->trueAnswerRegex = $trueAnswerRegex;
$this->setNormalizer($this->getDefaultNormalizer());
@@ -45,7 +44,7 @@ class Confirmation extends Question
return $answer;
}
$answerIsTrue = (bool)preg_match($regex, $answer);
$answerIsTrue = (bool) preg_match($regex, $answer);
if (false === $default) {
return $answer && $answerIsTrue;
}
@@ -53,4 +52,4 @@ class Confirmation extends Question
return !$answer || $answerIsTrue;
};
}
}
}