Skip to content

Commit

Permalink
Backwards compatibility for people with custom rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 13, 2021
1 parent ee00093 commit 0705fef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Rules/BooleansInConditions/BooleanInBooleanAndRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/BooleansInConditions/BooleanInBooleanOrRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0705fef

Please sign in to comment.