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 = null;
}
public function roll(): int
$this->value = random_int(1, 6);
return $this->value;
public function getValue(): ?int
public function getAsString(): string
return "[{$this->value}]";