| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function create($width, $height, $index = 0) |
||
| 17 | { |
||
| 18 | $index = $index % 2; |
||
| 19 | |||
| 20 | // TODO set proper default size & font. |
||
| 21 | |||
| 22 | $background = new Quad(); |
||
| 23 | $background->setSize($width, $height); |
||
| 24 | if ($index == 0) { |
||
| 25 | $background->setBackgroundColor("eee5"); |
||
| 26 | } else { |
||
| 27 | $background->setBackgroundColor("eee3"); |
||
| 28 | } |
||
| 29 | return $background; |
||
| 30 | } |
||
| 31 | } |
||
| 32 |