diff --git a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php index 8c884aec4ad..d725f22c617 100644 --- a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php +++ b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -109,7 +109,7 @@ public function closeCursor() $this->statement->closeCursor(); if ($this->emptied && $this->data !== null) { $data = $this->resultCache->fetch($this->cacheKey); - if (!$data) { + if ( ! $data) { $data = array(); } $data[$this->realKey] = $this->data; diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index 54462b45b41..b778d47f9e4 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -652,7 +652,7 @@ public function executeQuery($query, array $params = array(), $types = array(), public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp) { $resultCache = $qcp->getResultCacheDriver() ?: $this->_config->getResultCacheImpl(); - if (!$resultCache) { + if ( ! $resultCache) { throw CacheException::noResultDriverConfigured(); } @@ -872,7 +872,7 @@ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoint throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction(); } - if (!$this->_platform->supportsSavepoints()) { + if ( ! $this->_platform->supportsSavepoints()) { throw ConnectionException::savepointsNotSupported(); } @@ -1025,7 +1025,7 @@ public function rollback() */ public function createSavepoint($savepoint) { - if (!$this->_platform->supportsSavepoints()) { + if ( ! $this->_platform->supportsSavepoints()) { throw ConnectionException::savepointsNotSupported(); } @@ -1041,7 +1041,7 @@ public function createSavepoint($savepoint) */ public function releaseSavepoint($savepoint) { - if (!$this->_platform->supportsSavepoints()) { + if ( ! $this->_platform->supportsSavepoints()) { throw ConnectionException::savepointsNotSupported(); } @@ -1059,7 +1059,7 @@ public function releaseSavepoint($savepoint) */ public function rollbackSavepoint($savepoint) { - if (!$this->_platform->supportsSavepoints()) { + if ( ! $this->_platform->supportsSavepoints()) { throw ConnectionException::savepointsNotSupported(); } diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index c9d2fef53a4..8b57adf4059 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -34,7 +34,7 @@ public function __construct(array $params, $username, $password, $driverOptions } else { $this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions); } - if (!$this->_conn) { + if ( ! $this->_conn) { throw new DB2Exception(db2_conn_errormsg()); } } @@ -42,7 +42,7 @@ public function __construct(array $params, $username, $password, $driverOptions public function prepare($sql) { $stmt = @db2_prepare($this->_conn, $sql); - if (!$stmt) { + if ( ! $stmt) { throw new DB2Exception(db2_stmt_errormsg()); } return new DB2Statement($stmt); @@ -112,4 +112,4 @@ public function errorInfo() 1 => $this->errorCode(), ); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php index a4819462dc7..55164b77cab 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -77,7 +77,7 @@ public function bindParam($column, &$variable, $type = null) */ public function closeCursor() { - if (!$this->_stmt) { + if ( ! $this->_stmt) { return false; } @@ -93,7 +93,7 @@ public function closeCursor() */ public function columnCount() { - if (!$this->_stmt) { + if ( ! $this->_stmt) { return false; } return db2_num_fields($this->_stmt); @@ -123,7 +123,7 @@ public function errorInfo() */ public function execute($params = null) { - if (!$this->_stmt) { + if ( ! $this->_stmt) { return false; } diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php index b69535b1dd2..6d7bd14d9e8 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -37,7 +37,7 @@ public function __construct(array $params, $username, $password, array $driverOp $socket = isset($params['unix_socket']) ? $params['unix_socket'] : ini_get('mysqli.default_socket'); $this->_conn = mysqli_init(); - if (!$this->_conn->real_connect($params['host'], $username, $password, $params['dbname'], $port, $socket)) { + if ( ! $this->_conn->real_connect($params['host'], $username, $password, $params['dbname'], $port, $socket)) { throw new MysqliException($this->_conn->connect_error, $this->_conn->connect_errno); } diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php index 2af34668d3c..c562099f55a 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php @@ -131,7 +131,7 @@ public function execute($params = null) { if (null !== $this->_bindedValues) { if (null !== $params) { - if (!$this->_bindValues($params)) { + if ( ! $this->_bindValues($params)) { throw new MysqliException($this->_stmt->error, $this->_stmt->errno); } } else { @@ -141,7 +141,7 @@ public function execute($params = null) } } - if (!$this->_stmt->execute()) { + if ( ! $this->_stmt->execute()) { throw new MysqliException($this->_stmt->error, $this->_stmt->errno); } diff --git a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php index 18653965e4f..5e17a9ae170 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php @@ -44,7 +44,7 @@ public function __construct($username, $password, $db, $charset = null, $session } $this->_dbh = @oci_connect($username, $password, $db, $charset, $sessionMode); - if (!$this->_dbh) { + if ( ! $this->_dbh) { throw OCI8Exception::fromErrorInfo(oci_error()); } } diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php index 460049af63b..11e0a5830b2 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php @@ -41,7 +41,7 @@ class SQLSrvConnection implements \Doctrine\DBAL\Driver\Connection public function __construct($serverName, $connectionOptions) { $this->conn = sqlsrv_connect($serverName, $connectionOptions); - if (!$this->conn) { + if ( ! $this->conn) { throw SQLSrvException::fromSqlSrvErrors(); } $this->lastInsertId = new LastInsertId(); diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php index b1fb426b53f..14369e9b4d5 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php @@ -33,7 +33,7 @@ static public function fromSqlSrvErrors() foreach ($errors as $error) { $message .= "SQLSTATE [".$error['SQLSTATE'].", ".$error['code']."]: ". $error['message']."\n"; } - if (!$message) { + if ( ! $message) { $message = "SQL Server error occured but no error message was retrieved from driver."; } diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php index 649f703460c..6c174893c55 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php @@ -164,7 +164,7 @@ public function execute($params = null) } $this->stmt = sqlsrv_query($this->conn, $this->sql, $this->params); - if (!$this->stmt) { + if ( ! $this->stmt) { throw SQLSrvException::fromSqlSrvErrors(); } diff --git a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php index ebd21635a57..2737fb53f2f 100644 --- a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php @@ -53,7 +53,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs */ public function __construct($table, AbstractPlatform $platform) { - if (!$table instanceof Table && !is_string($table)) { + if ( ! $table instanceof Table && !is_string($table)) { throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); } diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 5ed7be9d18c..b0addc219a8 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -1387,7 +1387,7 @@ protected function onSchemaAlterTableAddColumn(Column $column, TableDiff $diff, return false; } - if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) { + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) { return false; } @@ -1410,7 +1410,7 @@ protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $dif return false; } - if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) { + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) { return false; } @@ -1433,7 +1433,7 @@ protected function onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableD return false; } - if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) { + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) { return false; } @@ -1457,7 +1457,7 @@ protected function onSchemaAlterTableRenameColumn($oldColumnName, Column $column return false; } - if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) { + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) { return false; } @@ -1478,7 +1478,7 @@ protected function onSchemaAlterTable(TableDiff $diff, &$sql) return false; } - if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTable)) { + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTable)) { return false; } @@ -2672,7 +2672,7 @@ final public function getReservedKeywordsList() { $class = $this->getReservedKeywordsClass(); $keywords = new $class; - if (!$keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) { + if ( ! $keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) { throw DBALException::notSupported(__METHOD__); } return $keywords; diff --git a/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/lib/Doctrine/DBAL/Platforms/DB2Platform.php index 77de06ec657..a6717817db5 100644 --- a/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -413,7 +413,7 @@ public function getAlterTableSQL(TableDiff $diff) $tableSql = array(); - if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { if (count($queryParts) > 0) { $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(" ", $queryParts); } diff --git a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php index d89c84cf409..5ff8aafd133 100644 --- a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php @@ -347,7 +347,7 @@ public function getAlterTableSQL(TableDiff $diff) $sql = array(); $tableSql = array(); - if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { if (count($queryParts) > 0) { $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(", ", $queryParts); } diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php b/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php index 980d33d6314..a49d94dcf9e 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php @@ -71,7 +71,7 @@ private function isReservedWord($word) private function addViolation($asset, $violatedPlatforms) { - if (!$violatedPlatforms) { + if ( ! $violatedPlatforms) { return; } diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index 6bac3b98389..17ca69f5b3c 100644 --- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -505,7 +505,7 @@ public function getAlterTableSQL(TableDiff $diff) $sql = array(); $tableSql = array(); - if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { if (count($queryParts) > 0) { $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(", ", $queryParts); } diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index bbd47741f8d..1dc7c2e8ad5 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -624,7 +624,7 @@ public function getAlterTableSQL(TableDiff $diff) $tableSql = array(); - if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { if ($diff->newName !== false) { $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; } diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index a8bf0b73cf4..b804cd328fb 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -457,7 +457,7 @@ public function getAlterTableSQL(TableDiff $diff) $tableSql = array(); - if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { if ($diff->newName !== false) { $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; } diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index a64cac7a567..7db8d422145 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -509,7 +509,7 @@ public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = f { $trimFn = ''; - if (!$char) { + if ( ! $char) { if ($pos == self::TRIM_LEADING) { $trimFn = 'LTRIM'; } else if ($pos == self::TRIM_TRAILING) { @@ -692,7 +692,7 @@ protected function doModifyLimitQuery($query, $limit, $offset = null) } else { $orderby = stristr($query, 'ORDER BY'); - if (!$orderby) { + if ( ! $orderby) { $over = 'ORDER BY (SELECT 0)'; } else { $over = preg_replace('/\"[^,]*\".\"([^,]*)\"/i', '"inner_tbl"."$1"', $orderby); diff --git a/lib/Doctrine/DBAL/Portability/Statement.php b/lib/Doctrine/DBAL/Portability/Statement.php index cca40ae6de9..96fa9f0c4ed 100644 --- a/lib/Doctrine/DBAL/Portability/Statement.php +++ b/lib/Doctrine/DBAL/Portability/Statement.php @@ -134,7 +134,7 @@ public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $columnIndex = 0) $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM); $fixCase = !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE); - if (!$iterateRow && !$fixCase) { + if ( ! $iterateRow && !$fixCase) { return $rows; } @@ -147,7 +147,7 @@ public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $columnIndex = 0) protected function fixRow($row, $iterateRow, $fixCase) { - if (!$row) { + if ( ! $row) { return $row; } diff --git a/lib/Doctrine/DBAL/Schema/AbstractAsset.php b/lib/Doctrine/DBAL/Schema/AbstractAsset.php index 08495142034..8c5ee1aadb2 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractAsset.php +++ b/lib/Doctrine/DBAL/Schema/AbstractAsset.php @@ -123,7 +123,7 @@ public function getShortestName($defaultNamespaceName) public function getFullQualifiedName($defaultNamespaceName) { $name = $this->getName(); - if (!$this->_namespace) { + if ( ! $this->_namespace) { $name = $defaultNamespaceName . "." . $name; } return strtolower($name); diff --git a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index 9c4a3d7b0c8..494440ed9cf 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -148,7 +148,7 @@ public function listSequences($database = null) */ public function listTableColumns($table, $database = null) { - if (!$database) { + if ( ! $database) { $database = $this->_conn->getDatabase(); } @@ -212,7 +212,7 @@ public function listTableNames() protected function filterAssetNames($assetNames) { $filterExpr = $this->getFilterSchemaAssetsExpression(); - if (!$filterExpr) { + if ( ! $filterExpr) { return $assetNames; } return array_values ( @@ -668,7 +668,7 @@ protected function _getPortableTableColumnList($table, $database, $tableColumns) $column = $eventArgs->getColumn(); } - if (!$defaultPrevented) { + if ( ! $defaultPrevented) { $column = $this->_getPortableTableColumnDefinition($tableColumn); } @@ -733,7 +733,7 @@ protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null $index = $eventArgs->getIndex(); } - if (!$defaultPrevented) { + if ( ! $defaultPrevented) { $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary'], $data['flags']); } diff --git a/lib/Doctrine/DBAL/Schema/Comparator.php b/lib/Doctrine/DBAL/Schema/Comparator.php index 65ff89b2305..554a043f560 100644 --- a/lib/Doctrine/DBAL/Schema/Comparator.php +++ b/lib/Doctrine/DBAL/Schema/Comparator.php @@ -100,7 +100,7 @@ public function compare(Schema $fromSchema, Schema $toSchema) foreach ($toSchema->getSequences() as $sequence) { $sequenceName = $sequence->getShortestName($toSchema->getName()); - if (!$fromSchema->hasSequence($sequenceName)) { + if ( ! $fromSchema->hasSequence($sequenceName)) { $diff->newSequences[] = $sequence; } else { if ($this->diffSequence($sequence, $fromSchema->getSequence($sequenceName))) { @@ -111,7 +111,7 @@ public function compare(Schema $fromSchema, Schema $toSchema) foreach ($fromSchema->getSequences() as $sequence) { $sequenceName = $sequence->getShortestName($fromSchema->getName()); - if (!$toSchema->hasSequence($sequenceName)) { + if ( ! $toSchema->hasSequence($sequenceName)) { $diff->removedSequences[] = $sequence; } } diff --git a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php index 1bd958fcae9..ae845f84d72 100644 --- a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -156,7 +156,7 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) $index = $eventArgs->getIndex(); } - if (!$defaultPrevented) { + if ( ! $defaultPrevented) { $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); } diff --git a/lib/Doctrine/DBAL/Schema/Index.php b/lib/Doctrine/DBAL/Schema/Index.php index 51741c69277..445132b2a6c 100644 --- a/lib/Doctrine/DBAL/Schema/Index.php +++ b/lib/Doctrine/DBAL/Schema/Index.php @@ -160,7 +160,7 @@ public function isFullfilledBy(Index $other) $sameColumns = $this->spansColumns($other->getColumns()); if ($sameColumns) { - if (!$this->isUnique() && !$this->isPrimary()) { + if ( ! $this->isUnique() && !$this->isPrimary()) { // this is a special case: If the current key is neither primary or unique, any uniqe or // primary key will always have the same effect for the index and there cannot be any constraint // overlaps. This means a primary or unique index can always fullfill the requirements of just an diff --git a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php index 055369d1235..a12097258d1 100644 --- a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -144,7 +144,7 @@ protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null $index = $eventArgs->getIndex(); } - if (!$defaultPrevented) { + if ( ! $defaultPrevented) { $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); } diff --git a/lib/Doctrine/DBAL/Schema/Table.php b/lib/Doctrine/DBAL/Schema/Table.php index 73e9b84a8e3..774eb5158d0 100644 --- a/lib/Doctrine/DBAL/Schema/Table.php +++ b/lib/Doctrine/DBAL/Schema/Table.php @@ -180,7 +180,7 @@ public function dropPrimaryKey() public function dropIndex($indexName) { $indexName = strtolower($indexName); - if (!$this->hasIndex($indexName)) { + if ( ! $this->hasIndex($indexName)) { throw SchemaException::indexDoesNotExist($indexName, $this->_name); } unset($this->_indexes[$indexName]); @@ -549,7 +549,7 @@ public function hasColumn($columnName) public function getColumn($columnName) { $columnName = strtolower($this->trimQuotes($columnName)); - if (!$this->hasColumn($columnName)) { + if ( ! $this->hasColumn($columnName)) { throw SchemaException::columnDoesNotExist($columnName, $this->_name); } @@ -561,7 +561,7 @@ public function getColumn($columnName) */ public function getPrimaryKey() { - if (!$this->hasPrimaryKey()) { + if ( ! $this->hasPrimaryKey()) { return null; } return $this->getIndex($this->_primaryKeyName); @@ -594,7 +594,7 @@ public function hasIndex($indexName) public function getIndex($indexName) { $indexName = strtolower($indexName); - if (!$this->hasIndex($indexName)) { + if ( ! $this->hasIndex($indexName)) { throw SchemaException::indexDoesNotExist($indexName, $this->_name); } return $this->_indexes[$indexName]; diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index 8a01c4b6127..91ffab48c98 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $conn = $this->getHelper('db')->getConnection(); $keywordLists = (array)$input->getOption('list'); - if (!$keywordLists) { + if ( ! $keywordLists) { $keywordLists = array('mysql', 'pgsql', 'sqlite', 'oracle', 'mssql'); } diff --git a/lib/Doctrine/DBAL/Types/DateTimeType.php b/lib/Doctrine/DBAL/Types/DateTimeType.php index 7500df6e92b..9103b830d47 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -51,7 +51,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) } $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value); - if (!$val) { + if ( ! $val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString()); } return $val; diff --git a/lib/Doctrine/DBAL/Types/DateTimeTzType.php b/lib/Doctrine/DBAL/Types/DateTimeTzType.php index c8412359083..1c8df1dc8e8 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeTzType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeTzType.php @@ -71,7 +71,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) } $val = \DateTime::createFromFormat($platform->getDateTimeTzFormatString(), $value); - if (!$val) { + if ( ! $val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeTzFormatString()); } return $val; diff --git a/lib/Doctrine/DBAL/Types/DateType.php b/lib/Doctrine/DBAL/Types/DateType.php index 58933a8e3f8..e4669ba5206 100644 --- a/lib/Doctrine/DBAL/Types/DateType.php +++ b/lib/Doctrine/DBAL/Types/DateType.php @@ -51,7 +51,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) } $val = \DateTime::createFromFormat('!'.$platform->getDateFormatString(), $value); - if (!$val) { + if ( ! $val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateFormatString()); } return $val; diff --git a/lib/Doctrine/DBAL/Types/TimeType.php b/lib/Doctrine/DBAL/Types/TimeType.php index c32a7b17c80..1b0c688db43 100644 --- a/lib/Doctrine/DBAL/Types/TimeType.php +++ b/lib/Doctrine/DBAL/Types/TimeType.php @@ -60,7 +60,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) } $val = \DateTime::createFromFormat($platform->getTimeFormatString(), $value); - if (!$val) { + if ( ! $val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getTimeFormatString()); } return $val; diff --git a/lib/Doctrine/DBAL/Types/VarDateTimeType.php b/lib/Doctrine/DBAL/Types/VarDateTimeType.php index 31471b55c94..a271596e5e0 100644 --- a/lib/Doctrine/DBAL/Types/VarDateTimeType.php +++ b/lib/Doctrine/DBAL/Types/VarDateTimeType.php @@ -52,7 +52,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) } $val = date_create($value); - if (!$val) { + if ( ! $val) { throw ConversionException::conversionFailed($value, $this->getName()); } return $val;