for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Dice;
class Dice
{
protected $value;
public function __construct()
$this->value = random_int(1, 6);
}
public function roll(): int
return $this->value;
public function getAsString(): string
return "[{$this->value}]";
/**
* Get the value of the last roll.
*
* @return int as value rolled.
*/
public function getValue(): int