Skip to content

Commit 0705fef

Browse files
committed
Backwards compatibility for people with custom rulesets
1 parent ee00093 commit 0705fef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BooleanInBooleanAndRule implements \PHPStan\Rules\Rule
1818
/** @var bool */
1919
private $checkLogicalAndConstantCondition;
2020

21-
public function __construct(BooleanRuleHelper $helper, bool $checkLogicalAndConstantCondition)
21+
public function __construct(BooleanRuleHelper $helper, bool $checkLogicalAndConstantCondition = false)
2222
{
2323
$this->helper = $helper;
2424
$this->checkLogicalAndConstantCondition = $checkLogicalAndConstantCondition;

src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BooleanInBooleanOrRule implements \PHPStan\Rules\Rule
1818
/** @var bool */
1919
private $checkLogicalOrConstantCondition;
2020

21-
public function __construct(BooleanRuleHelper $helper, bool $checkLogicalOrConstantCondition)
21+
public function __construct(BooleanRuleHelper $helper, bool $checkLogicalOrConstantCondition = false)
2222
{
2323
$this->helper = $helper;
2424
$this->checkLogicalOrConstantCondition = $checkLogicalOrConstantCondition;

0 commit comments

Comments
 (0)