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 |
||
22 | public function flip() |
||
23 | { |
||
24 | $parameters = ['n' => 1, 'min' => 0, 'max' => 1]; |
||
25 | |||
26 | $generateIntegers = (new GenerateIntegers($this->getHttpClient())) |
||
27 | ->withParameters($parameters); |
||
28 | |||
29 | $result = $this->getRandomOrgAPI()->getData($generateIntegers); |
||
30 | |||
31 | $this->face = (1 == $result[0]) ? 'tails' : 'heads'; |
||
32 | |||
33 | return $this; |
||
34 | } |
||
35 | |||
46 |