src/Annotations/AbstractAnnotation.php
private function validateDefaultTypes($type, $value): bool
    {
        switch ($type) {
            case 'string':
                return is_string($value);
            case 'boolean':
                return is_bool($value);
            case 'integer':
                return is_int($value);
            case 'number':
                return is_numeric($value);
            case 'object':
                return is_object($value);
            case 'array':
                return $this->validateArrayType($value);
            case 'scheme':
                return in_array($value, ['http', 'https', 'ws', 'wss'], true);
            default:
                throw new Exception('Invalid type "' . $type . '"');
        }
    }
private function validateDefaultTypes($type, $value): bool
    {
        switch ($type) {
            case 'string':
                return is_string($value);
            case 'boolean':
                return is_bool($value);
            case 'integer':
                return is_int($value);
            case 'number':
                return is_numeric($value);
            case 'object':
                return is_object($value);
            case 'array':
                return $this->validateArrayType($value);
            case 'scheme':
                return in_array($value, ['http', 'https', 'ws', 'wss'], true);
            default:
                throw new Exception('Invalid type "' . $type . '"');
        }
    }
private function validateDefaultTypes ( $ type , $ value ) : bool { switch ( $ type ) { case 'string' : return is_string ( $ value ) ; case 'boolean' : return is_bool ( $ value ) ; case 'integer' : return is_int ( $ value ) ; case 'number' : return is_numeric ( $ value ) ; case 'object' : return is_object ( $ value ) ; case 'array' : return $ this -> validateArrayType ( $ value ) ; case 'scheme' : return in_array ( $ value , [ 'http' , 'https' , 'ws' , 'wss' ] , true ) ; default : throw new Exception ( 'Invalid type "' . $ type . '"' ) ; } }
Validates default Open Api types

@param string $type The property type
@param mixed $value The value to validate

@return bool
@throws \Exception
Validates default Open Api types