@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | throw ShardingException::activeTransaction(); |
158 | 158 | } |
159 | 159 | |
160 | - if ($distributionValue === null || is_bool($distributionValue) || !is_scalar($distributionValue)) { |
|
160 | + if ($distributionValue === null || is_bool($distributionValue) || ! is_scalar($distributionValue)) { |
|
161 | 161 | throw ShardingException::noShardDistributionValue(); |
162 | 162 | } |
163 | 163 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | public function queryAll($sql, array $params = [], array $types = []) |
205 | 205 | { |
206 | 206 | $shards = $this->getShards(); |
207 | - if (!$shards) { |
|
207 | + if ( ! $shards) { |
|
208 | 208 | throw new \RuntimeException("No shards found for " . $this->federationName); |
209 | 209 | } |
210 | 210 |
@@ -96,7 +96,7 @@ |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | $table->addColumn($this->tenantColumnName, $this->tenantColumnType, [ |
99 | - 'default' => "federation_filtering_value('". $this->distributionName ."')", |
|
99 | + 'default' => "federation_filtering_value('" . $this->distributionName . "')", |
|
100 | 100 | ]); |
101 | 101 | |
102 | 102 | $clusteredIndex = $this->getClusteredIndex($table); |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null) |
94 | 94 | { |
95 | - if ( !isset($params['global']) || !isset($params['shards'])) { |
|
95 | + if ( ! isset($params['global']) || ! isset($params['shards'])) { |
|
96 | 96 | throw new \InvalidArgumentException("Connection Parameters require 'global' and 'shards' configurations."); |
97 | 97 | } |
98 | 98 | |
99 | - if ( !isset($params['shardChoser'])) { |
|
99 | + if ( ! isset($params['shardChoser'])) { |
|
100 | 100 | throw new \InvalidArgumentException("Missing Shard Choser configuration 'shardChoser'"); |
101 | 101 | } |
102 | 102 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | throw new \InvalidArgumentException("Missing 'id' for one configured shard. Please specify a unique shard-id."); |
116 | 116 | } |
117 | 117 | |
118 | - if ( !is_numeric($shard['id']) || $shard['id'] < 1) { |
|
118 | + if ( ! is_numeric($shard['id']) || $shard['id'] < 1) { |
|
119 | 119 | throw new \InvalidArgumentException("Shard Id has to be a non-negative number."); |
120 | 120 | } |
121 | 121 |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | $types = $this->extractTypeValues($columns, $types); |
759 | 759 | } |
760 | 760 | |
761 | - $sql = 'UPDATE ' . $tableExpression . ' SET ' . implode(', ', $set) |
|
761 | + $sql = 'UPDATE ' . $tableExpression . ' SET ' . implode(', ', $set) |
|
762 | 762 | . ' WHERE ' . implode(' AND ', $conditions); |
763 | 763 | |
764 | 764 | return $this->executeUpdate($sql, $values, $types); |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | } |
979 | 979 | } |
980 | 980 | |
981 | - if (!isset($stmt)) { |
|
981 | + if ( ! isset($stmt)) { |
|
982 | 982 | $stmt = new ResultCacheStatement($this->executeQuery($query, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime()); |
983 | 983 | } |
984 | 984 | |
@@ -1250,7 +1250,7 @@ discard block |
||
1250 | 1250 | */ |
1251 | 1251 | protected function _getNestedTransactionSavePointName() |
1252 | 1252 | { |
1253 | - return 'DOCTRINE2_SAVEPOINT_'.$this->_transactionNestingLevel; |
|
1253 | + return 'DOCTRINE2_SAVEPOINT_' . $this->_transactionNestingLevel; |
|
1254 | 1254 | } |
1255 | 1255 | |
1256 | 1256 | /** |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function __construct($table, AbstractPlatform $platform) |
57 | 57 | { |
58 | - if ( ! $table instanceof Table && !is_string($table)) { |
|
58 | + if ( ! $table instanceof Table && ! is_string($table)) { |
|
59 | 59 | throw new \InvalidArgumentException('SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); |
60 | 60 | } |
61 | 61 |
@@ -66,8 +66,8 @@ |
||
66 | 66 | */ |
67 | 67 | public function postConnect(ConnectionEventArgs $args) |
68 | 68 | { |
69 | - $collation = ($this->_collation) ? " COLLATE ".$this->_collation : ""; |
|
70 | - $args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation); |
|
69 | + $collation = ($this->_collation) ? " COLLATE " . $this->_collation : ""; |
|
70 | + $args->getConnection()->executeUpdate("SET NAMES " . $this->_charset . $collation); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $vars[] = $option . " = '" . $value . "'"; |
80 | 80 | } |
81 | 81 | } |
82 | - $sql = "ALTER SESSION SET ".implode(" ", $vars); |
|
82 | + $sql = "ALTER SESSION SET " . implode(" ", $vars); |
|
83 | 83 | $args->getConnection()->executeUpdate($sql); |
84 | 84 | } |
85 | 85 | } |
@@ -142,7 +142,7 @@ |
||
142 | 142 | ]; |
143 | 143 | } |
144 | 144 | |
145 | - $sql = "UPDATE " . $this->generatorTableName . " ". |
|
145 | + $sql = "UPDATE " . $this->generatorTableName . " " . |
|
146 | 146 | "SET sequence_value = sequence_value + sequence_increment_by " . |
147 | 147 | "WHERE sequence_name = ? AND sequence_value = ?"; |
148 | 148 | $rows = $this->conn->executeUpdate($sql, [$sequenceName, $row['sequence_value']]); |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | $isArray = is_array($sqlPart); |
433 | 433 | $isMultiple = is_array($this->sqlParts[$sqlPartName]); |
434 | 434 | |
435 | - if ($isMultiple && !$isArray) { |
|
435 | + if ($isMultiple && ! $isArray) { |
|
436 | 436 | $sqlPart = [$sqlPart]; |
437 | 437 | } |
438 | 438 | |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | */ |
758 | 758 | public function set($key, $value) |
759 | 759 | { |
760 | - return $this->add('set', $key .' = ' . $value, true); |
|
760 | + return $this->add('set', $key . ' = ' . $value, true); |
|
761 | 761 | } |
762 | 762 | |
763 | 763 | /** |
@@ -1038,7 +1038,7 @@ discard block |
||
1038 | 1038 | */ |
1039 | 1039 | public function orderBy($sort, $order = null) |
1040 | 1040 | { |
1041 | - return $this->add('orderBy', $sort . ' ' . (! $order ? 'ASC' : $order), false); |
|
1041 | + return $this->add('orderBy', $sort . ' ' . ( ! $order ? 'ASC' : $order), false); |
|
1042 | 1042 | } |
1043 | 1043 | |
1044 | 1044 | /** |
@@ -1051,7 +1051,7 @@ discard block |
||
1051 | 1051 | */ |
1052 | 1052 | public function addOrderBy($sort, $order = null) |
1053 | 1053 | { |
1054 | - return $this->add('orderBy', $sort . ' ' . (! $order ? 'ASC' : $order), true); |
|
1054 | + return $this->add('orderBy', $sort . ' ' . ( ! $order ? 'ASC' : $order), true); |
|
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | /** |