| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function flip() |
||
| 25 | { |
||
| 26 | $parameters = ['n' => 1, 'min' => 0, 'max' => 1]; |
||
| 27 | |||
| 28 | $generateIntegers = Provider::withResource('generateIntegers') |
||
| 29 | ->withParameters($parameters); |
||
| 30 | |||
| 31 | $result = $this->getRandomOrgAPI()->getData($generateIntegers); |
||
| 32 | |||
| 33 | $this->face = (1 === $result[0]) ? 'tails' : 'heads'; |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 48 |