src/Validator/Max.php
public function isValid($value)
    {
        $this->resetMessages();

        $this->value = $value;

        if (!is_scalar($value) || is_bool($value)) {
            throw new \InvalidArgumentException('Unexpected type: '.gettype($value));
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException('Unexpected value: '.$value);
        }

        if ($value > $this->max) {
            $this->addMessage();

            return false;
        }

        return true;
    }
public function isValid($value)
    {
        $this->resetMessages();

        $this->value = $value;

        if (!is_scalar($value) || is_bool($value)) {
            throw new \InvalidArgumentException('Unexpected type: '.gettype($value));
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException('Unexpected value: '.$value);
        }

        if ($value > $this->max) {
            $this->addMessage();

            return false;
        }

        return true;
    }
{@inheritdoc}