for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace luya\web\jsonld;
use yii\base\InvalidConfigException;
class RangeValue extends BaseValue
{
private $_value;
public function __construct($value)
$this->_value = $value;
}
public function ensureRange($min, $max)
if (!in_array($this->_value, range($min, $max))) {
throw new InvalidConfigException("Value {$this->_value} must be min {$min} or max {$max}.");
public function getValue()
return $this->_value;