public function safeQuery(
        string $statement,
        array $params = [],
        int $fetchStyle = self::DEFAULT_FETCH_STYLE,
        bool $returnNumAffected = false,
        bool $calledWithVariadicParams = false
    ) {
        if ($fetchStyle === self::DEFAULT_FETCH_STYLE) {
            if (isset($this->options[\PDO::ATTR_DEFAULT_FETCH_MODE])) {
                /**
                 * @var int $fetchStyle
                 */
                $fetchStyle = $this->options[\PDO::ATTR_DEFAULT_FETCH_MODE];
            } else {
                $fetchStyle = \PDO::FETCH_ASSOC;
            }
        }

        if (empty($params)) {
            $stmt = $this->pdo->query($statement);
            if ($returnNumAffected) {
                return (int) $stmt->rowCount();
            }
            return $this->getResultsStrictTyped($stmt, $fetchStyle);
        }
        if (!$this->is1DArray($params)) {
            if ($calledWithVariadicParams) {
                throw new Issues\MustBeOneDimensionalArray(
                    'Only one-dimensional arrays are allowed, please use ' .
                    __METHOD__ .
                    '()'
                );
            }

            throw new Issues\MustBeOneDimensionalArray(
                'Only one-dimensional arrays are allowed.'
            );
        }
        $stmt = $this->prepare($statement);
        $stmt->execute($params);
        if ($returnNumAffected) {
            return (int) $stmt->rowCount();
        }
        return $this->getResultsStrictTyped($stmt, $fetchStyle);
    }