| 1 | <?php |
||
| 12 | class RuleCollection extends Collection |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var RuleInterface[] |
||
| 17 | */ |
||
| 18 | protected $collection = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Add Rule to collection |
||
| 22 | * |
||
| 23 | * @param RuleInterface $rule |
||
| 24 | */ |
||
| 25 | 1 | public function add(RuleInterface $rule) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Check all rules in collection |
||
| 32 | * |
||
| 33 | * @param Subject $ruleSubject |
||
| 34 | * |
||
| 35 | * @return ResultCollection |
||
| 36 | */ |
||
| 37 | public function check(Subject $ruleSubject): ResultCollection |
||
| 47 | } |
||
| 48 |