protected function prepareStatement(string $sqlStatement, array $bindingValues): \PDOStatement
    {
        $pdoStatement = $this->connection->prepare($sqlStatement);
        if ($pdoStatement === false) {
            $this->throwError($this->connection->errorInfo());
        }

        foreach ($bindingValues as $key => $value) {
            if (is_int($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_INT);
            } elseif (is_bool($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_BOOL);
            } elseif (is_null($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_NULL);
            } else {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_STR);
            }
        }

        return $pdoStatement;
    }
protected function prepareStatement(string $sqlStatement, array $bindingValues): \PDOStatement
    {
        $pdoStatement = $this->connection->prepare($sqlStatement);
        if ($pdoStatement === false) {
            $this->throwError($this->connection->errorInfo());
        }

        foreach ($bindingValues as $key => $value) {
            if (is_int($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_INT);
            } elseif (is_bool($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_BOOL);
            } elseif (is_null($value)) {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_NULL);
            } else {
                $pdoStatement->bindValue($key, $value, \PDO::PARAM_STR);
            }
        }

        return $pdoStatement;
    }
protected function prepareStatement ( string $ sqlStatement , array $ bindingValues ) : \ PDOStatement { $ pdoStatement = $ this -> connection -> prepare ( $ sqlStatement ) ; if ( $ pdoStatement === false ) { $ this -> throwError ( $ this -> connection -> errorInfo ( ) ) ; } foreach ( $ bindingValues as $ key => $ value ) { if ( is_int ( $ value ) ) { $ pdoStatement -> bindValue ( $ key , $ value , \ PDO :: PARAM_INT ) ; } elseif ( is_bool ( $ value ) ) { $ pdoStatement -> bindValue ( $ key , $ value , \ PDO :: PARAM_BOOL ) ; } elseif ( is_null ( $ value ) ) { $ pdoStatement -> bindValue ( $ key , $ value , \ PDO :: PARAM_NULL ) ; } else { $ pdoStatement -> bindValue ( $ key , $ value , \ PDO :: PARAM_STR ) ; } } return $ pdoStatement ; }
Coverts an SQL statement into PDO statement object and binds all values.

@param string $sqlStatement
@param array $bindingValues
@return \PDOStatement
@throws DatabaseException()
Coverts an SQL statement into PDO statement object and binds all values .