src/Validator/Specific/Number.php
private function validateType(): bool
    {
        switch ($this->options['type']) {
            case 'integer':
                $isValid = \is_int($this->value) ? true : false;
                break;
            case 'float':
                $isValid = \is_int($this->value) || \is_float($this->value) ? true : false;
                break;
            default:
                $isValid = \is_int($this->value) || \is_float($this->value) ? true : false;
                break;
        }
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_NUMBER_INCORRECT_TYPE);
        }
        return $isValid;
    }
private function validateType(): bool
    {
        switch ($this->options['type']) {
            case 'integer':
                $isValid = \is_int($this->value) ? true : false;
                break;
            case 'float':
                $isValid = \is_int($this->value) || \is_float($this->value) ? true : false;
                break;
            default:
                $isValid = \is_int($this->value) || \is_float($this->value) ? true : false;
                break;
        }
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_NUMBER_INCORRECT_TYPE);
        }
        return $isValid;
    }
private function validateType ( ) : bool { switch ( $ this -> options [ 'type' ] ) { case 'integer' : $ isValid = \ is_int ( $ this -> value ) ? true : false ; break ; case 'float' : $ isValid = \ is_int ( $ this -> value ) || \ is_float ( $ this -> value ) ? true : false ; break ; default : $ isValid = \ is_int ( $ this -> value ) || \ is_float ( $ this -> value ) ? true : false ; break ; } if ( ! $ isValid ) { $ this -> setError ( self :: VALIDATOR_ERROR_NUMBER_INCORRECT_TYPE ) ; } return $ isValid ; }
Checks whether number is of required type. Integers are treated as valid floats.

@return bool
Checks whether number is of required type . Integers are treated as valid floats .