Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #6084 Change: Remove __constructor() from RuleSetDescriptionInt…
…erface (niklam) This PR was merged into the master branch. Discussion ---------- Change: Remove __constructor() from RuleSetDescriptionInterface Constructor should be defined by the implementation, not by the interface. With this change one could do, which is not possible at the moment due to the interface defining constructor with no parameters. ```php class MyDynamicRules implements RuleSetDescriptionInterface { protected bool $risky; public function __constructor(bool $risky = false) { $this->risky = $risky; } ... public function getRules(): array { // return rules based on $this->risky } } ``` This would allow doing something like ```php $myRules = new MyDynamicRules(true); $config->setRules(array_merge( $myRules->getRules(), [ /* more rules, override previously set rules */ ] ); ``` Commits ------- 1de299c Remove __constructor() from RuleSetDescriptionInterface
- Loading branch information