| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.8437 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 40 | 3 | protected function print_tail(Def\Rules\Rule $rule) { |
|
| 41 | 3 | if ($rule instanceof Def\Rules\Invoke) { |
|
| 42 | 3 | return "invoke ".$rule->invokes()->name(); |
|
| 43 | } |
||
| 44 | 1 | if($rule instanceof Def\Rules\DependOn) { |
|
| 45 | 1 | return "depend on ".$rule->dependency()->name(); |
|
| 46 | } |
||
| 47 | if ($rule instanceof Def\Rules\ContainText) { |
||
| 48 | return "contain text \"".$rule->regexp()."\""; |
||
| 49 | } |
||
| 50 | |||
| 51 | throw new \Exception("Unknown rule '".$cls."'"); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |