| Conditions | 4 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 11 | protected function checkRule($singleRule) |
|
| 37 | { |
||
| 38 | 11 | if (!is_object($singleRule)) { |
|
| 39 | 1 | throw new RuleException('Input is not an object.'); |
|
| 40 | } |
||
| 41 | 10 | if (! ( ($singleRule instanceof ARule) || ($singleRule instanceof File\AFileRule) ) ) { |
|
| 42 | 1 | throw new RuleException(sprintf('Input %s is not instance of ARule or AFileRule.', get_class($singleRule))); |
|
| 43 | } |
||
| 44 | 9 | return $singleRule; |
|
| 45 | } |
||
| 47 |