protected function parseType(array $input)
    {
        /** @var string $type */
        /** @var string[] $types */
        extract($input);
        switch ($type) {
            case 'array':
                if (!is_array($this->{$key}))
                    return false;
                break;
            case 'int':
            case 'integer':
                if (!is_int($this->{$key}))
                    return false;
                break;
            case 'or':
                $valid = false;
                foreach ($types as $_type) {
                    if (gettype($this->{$key}) == $_type) {
                        $valid = true;
                        break;
                    }
                }
                if (!$valid) return false;
                break;
            default:
                //throw new Exception('Incorrect rule');
                return null;
        }
        return true;
    }