summaryrefslogtreecommitdiff
path: root/includes/database
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-05-06 05:59:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-05-06 05:59:31 +0000
commited86172814c02747b7036745f0411e34998c6f4a (patch)
tree6246e7451a458ec832aefa9404675709e78e982a /includes/database
parent526558401680f5d8b402823dbd5d40fd17620980 (diff)
downloadbrdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.gz
brdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.bz2
#331951 by aspilicious, sun, jhodgdon, Morbus, et al: Figure out and apply coding standard for casting.
Diffstat (limited to 'includes/database')
-rw-r--r--includes/database/mysql/query.inc4
-rw-r--r--includes/database/pgsql/query.inc4
-rw-r--r--includes/database/query.inc16
-rw-r--r--includes/database/select.inc4
4 files changed, 14 insertions, 14 deletions
diff --git a/includes/database/mysql/query.inc b/includes/database/mysql/query.inc
index 032508870..843e22dfd 100644
--- a/includes/database/mysql/query.inc
+++ b/includes/database/mysql/query.inc
@@ -34,7 +34,7 @@ class InsertQuery_mysql extends InsertQuery {
$values = $this->fromQuery->getArguments();
}
- $last_insert_id = $this->connection->query((string)$this, $values, $this->queryOptions);
+ $last_insert_id = $this->connection->query((string) $this, $values, $this->queryOptions);
// Re-initialize the values array so that we can re-use this query.
$this->insertValues = array();
@@ -138,7 +138,7 @@ class MergeQuery_mysql extends MergeQuery {
//
// @link http ://dev.mysql.com/doc/refman/5.0/en/mysql-affected-rows.html
$this->queryOptions['return'] = Database::RETURN_AFFECTED;
- return $this->connection->query((string)$this, $values, $this->queryOptions);
+ return $this->connection->query((string) $this, $values, $this->queryOptions);
}
diff --git a/includes/database/pgsql/query.inc b/includes/database/pgsql/query.inc
index ac5072c76..0420f4aad 100644
--- a/includes/database/pgsql/query.inc
+++ b/includes/database/pgsql/query.inc
@@ -19,7 +19,7 @@ class InsertQuery_pgsql extends InsertQuery {
return NULL;
}
- $stmt = $this->connection->prepareQuery((string)$this);
+ $stmt = $this->connection->prepareQuery((string) $this);
// Fetch the list of blobs and sequences used on that table.
$table_information = $this->connection->schema()->queryTableInformation($this->table);
@@ -121,7 +121,7 @@ class UpdateQuery_pgsql extends UpdateQuery {
// Because we filter $fields the same way here and in __toString(), the
// placeholders will all match up properly.
- $stmt = $this->connection->prepareQuery((string)$this);
+ $stmt = $this->connection->prepareQuery((string) $this);
// Fetch the list of blobs and sequences used on that table.
$table_information = $this->connection->schema()->queryTableInformation($this->table);
diff --git a/includes/database/query.inc b/includes/database/query.inc
index 43c54f8a8..2e775bea5 100644
--- a/includes/database/query.inc
+++ b/includes/database/query.inc
@@ -442,7 +442,7 @@ class InsertQuery extends Query {
// If we're selecting from a SelectQuery, finish building the query and
// pass it back, as any remaining options are irrelevant.
if (!empty($this->fromQuery)) {
- $sql = (string)$this;
+ $sql = (string) $this;
// The SelectQuery may contain arguments, load and pass them through.
return $this->connection->query($sql, $this->fromQuery->getArguments(), $this->queryOptions);
}
@@ -453,7 +453,7 @@ class InsertQuery extends Query {
// we wrap it in a transaction so that it is atomic where possible. On many
// databases, such as SQLite, this is also a notable performance boost.
$transaction = $this->connection->startTransaction();
- $sql = (string)$this;
+ $sql = (string) $this;
foreach ($this->insertValues as $insert_values) {
$last_insert_id = $this->connection->query($sql, $insert_values, $this->queryOptions);
}
@@ -780,7 +780,7 @@ class MergeQuery extends Query {
}
$select = $select->countQuery();
- $sql = (string)$select;
+ $sql = (string) $select;
$arguments = $select->getArguments();
$num_existing = $this->connection->query($sql, $arguments)->fetchField();
@@ -896,7 +896,7 @@ class DeleteQuery extends Query implements QueryConditionInterface {
$values = $this->condition->arguments();
}
- return $this->connection->query((string)$this, $values, $this->queryOptions);
+ return $this->connection->query((string) $this, $values, $this->queryOptions);
}
public function __toString() {
@@ -936,7 +936,7 @@ class TruncateQuery extends Query {
}
public function execute() {
- return $this->connection->query((string)$this, array(), $this->queryOptions);
+ return $this->connection->query((string) $this, array(), $this->queryOptions);
}
public function __toString() {
@@ -1096,7 +1096,7 @@ class UpdateQuery extends Query implements QueryConditionInterface {
$update_values = array_merge($update_values, $this->condition->arguments());
}
- return $this->connection->query((string)$this, $update_values, $this->queryOptions);
+ return $this->connection->query((string) $this, $update_values, $this->queryOptions);
}
public function __toString() {
@@ -1218,7 +1218,7 @@ class DatabaseCondition implements QueryConditionInterface, Countable {
if ($condition['field'] instanceof QueryConditionInterface) {
// Compile the sub-condition recursively and add it to the list.
$condition['field']->compile($connection, $queryPlaceholder);
- $condition_fragments[] = '(' . (string)$condition['field'] . ')';
+ $condition_fragments[] = '(' . (string) $condition['field'] . ')';
$arguments += $condition['field']->arguments();
}
else {
@@ -1240,7 +1240,7 @@ class DatabaseCondition implements QueryConditionInterface, Countable {
$placeholders = array();
if ($condition['value'] instanceof SelectQueryInterface) {
$condition['value']->compile($connection, $queryPlaceholder);
- $placeholders[] = (string)$condition['value'];
+ $placeholders[] = (string) $condition['value'];
$arguments += $condition['value']->arguments();
}
// We assume that if there is a delimiter, then the value is an
diff --git a/includes/database/select.inc b/includes/database/select.inc
index 48bd04daf..3e7d27762 100644
--- a/includes/database/select.inc
+++ b/includes/database/select.inc
@@ -750,7 +750,7 @@ class SelectQueryExtender implements SelectQueryInterface {
}
public function __toString() {
- return (string)$this->query;
+ return (string) $this->query;
}
public function __clone() {
@@ -1103,7 +1103,7 @@ class SelectQuery extends Query implements SelectQueryInterface {
}
$args = $this->getArguments();
- return $this->connection->query((string)$this, $args, $this->queryOptions);
+ return $this->connection->query((string) $this, $args, $this->queryOptions);
}
public function distinct($distinct = TRUE) {