<?php {
$value = $this->get($key, $default);
if (! is_float($value)) {
throw new InvalidArgumentException(
sprintf('Configuration value for key [%s] must be a float, %s given.', $key, gettype($value))
);
<?php public function __construct($chances, $outOf = null)
{
if ($outOf === null && is_float($chances) && $chances > 1) {
throw new RuntimeException('Float must not be greater than 1.');
}