Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
76 | public function loadText() |
||
77 | { |
||
78 | $val_a = mt_rand(0, 9); |
||
79 | $val_b = mt_rand(0, 9); |
||
80 | if ($val_a > $val_b) { |
||
81 | $expression = "{$val_a} - {$val_b} = ?"; |
||
82 | $this->code = $val_a - $val_b; |
||
83 | } else { |
||
84 | $expression = "{$val_a} + {$val_b} = ?"; |
||
85 | $this->code = $val_a + $val_b; |
||
86 | } |
||
87 | |||
88 | return "<span style='font-style: normal; font-weight: bold; font-size: 100%; font-color: #333; border: 1px solid #333; padding: 1px 5px;'>{$expression}</span>"; |
||
89 | } |
||
90 | } |
||
91 |