for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace drupol\Yaroc\Examples;
use drupol\Yaroc\Plugin\Method\GenerateIntegers;
/**
* Class Coin.
*/
class Coin extends BaseExample
{
* @var string
protected $face;
* @throws \Http\Client\Exception
*
* @return $this
public function flip()
$parameters = ['n' => 1, 'min' => 0, 'max' => 1];
$generateIntegers = (new GenerateIntegers($this->getHttpClient()))
->withParameters($parameters);
$result = $this->getRandomOrgAPI()->getData($generateIntegers);
$this->face = (1 == $result[0]) ? 'tails' : 'heads';
return $this;
}
* Get the coin face.
* @return string
public function getFace()
return $this->face;