| Conditions | 7 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public static function propagateForSingleRule(RuleInterface $parentRule, RuleInterface $childRule): RuleInterface |
||
| 32 | { |
||
| 33 | if ($parentRule instanceof SkipOnEmptyInterface && $childRule instanceof SkipOnEmptyInterface) { |
||
| 34 | $childRule = $childRule->skipOnEmpty($parentRule->getSkipOnEmpty()); |
||
| 35 | } |
||
| 36 | |||
| 37 | if ($parentRule instanceof SkipOnErrorInterface && $childRule instanceof SkipOnErrorInterface) { |
||
| 38 | $childRule = $childRule->skipOnError($parentRule->shouldSkipOnError()); |
||
| 39 | } |
||
| 40 | |||
| 41 | if ($parentRule instanceof WhenInterface && $childRule instanceof WhenInterface) { |
||
| 42 | $childRule = $childRule->when($parentRule->getWhen()); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $childRule; |
||
| 46 | } |
||
| 48 |