From 0705fefc7c9168529fd130e341428f5f10f4f01d Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 13 Jan 2021 09:50:28 +0100 Subject: [PATCH] Backwards compatibility for people with custom rulesets --- src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php | 2 +- src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php b/src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php index c2de6c1c..5b332fd1 100644 --- a/src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php +++ b/src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php @@ -18,7 +18,7 @@ class BooleanInBooleanAndRule implements \PHPStan\Rules\Rule /** @var bool */ private $checkLogicalAndConstantCondition; - public function __construct(BooleanRuleHelper $helper, bool $checkLogicalAndConstantCondition) + public function __construct(BooleanRuleHelper $helper, bool $checkLogicalAndConstantCondition = false) { $this->helper = $helper; $this->checkLogicalAndConstantCondition = $checkLogicalAndConstantCondition; diff --git a/src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php b/src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php index de59ca2d..ed38ae97 100644 --- a/src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php +++ b/src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php @@ -18,7 +18,7 @@ class BooleanInBooleanOrRule implements \PHPStan\Rules\Rule /** @var bool */ private $checkLogicalOrConstantCondition; - public function __construct(BooleanRuleHelper $helper, bool $checkLogicalOrConstantCondition) + public function __construct(BooleanRuleHelper $helper, bool $checkLogicalOrConstantCondition = false) { $this->helper = $helper; $this->checkLogicalOrConstantCondition = $checkLogicalOrConstantCondition;