public function init($currentValue, $maxValue, $valueName)
24
{
25
$this->maxValue = $maxValue;
26
$this->currentValue = $currentValue;
27
$this->valueName = $valueName;
28
}
29
30
public function run()
31
{
32
if ($this->currentValue > $this->maxValue) {
33
return new Result(Result::STATUS_FAIL, 'The given value ("' . $this->valueName . '") is ' . $this->currentValue . ' and too big, it must be less than ' . $this->maxValue . '.');
34
} else {
35
return new Result(Result::STATUS_PASS, 'The value ("' . $this->valueName . '") was ' . $this->currentValue . '. Maximum was < ' . $this->maxValue . '.');