| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | private function generateBooleans() |
||
| 26 | { |
||
| 27 | $successRatio = ($this->likelihood / 100) * 10; |
||
| 28 | $failureRatio = 10 - $successRatio; |
||
| 29 | |||
| 30 | $booleans = array_fill(0, $successRatio, (int)true); |
||
| 31 | if ($successRatio !== 10) { |
||
| 32 | $booleans = array_merge($booleans, array_fill($successRatio+1, $failureRatio, (int)false)); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $booleans; |
||
| 36 | } |
||
| 37 | |||
| 50 |