Completed
Push — develop ( 3cf2fc...76184e )
by Simon
03:24
created
src/query/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
 		if( $this->limit ) {
58 58
 			$sql[] = "LIMIT :limit";
59
-			$this->params['limit']  = $this->limit;
59
+			$this->params['limit'] = $this->limit;
60 60
 		}
61 61
 
62 62
 		return $sql;
Please login to merge, or discard this patch.
src/BaseConnection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			);
82 82
 
83 83
 			$this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
84
-			$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);           // always use exceptions
84
+			$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); // always use exceptions
85 85
 
86 86
 			$this->setCharacterSet(
87 87
 				$this->getOption('charset', 'UTF8'),
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 	public function prepare( $statement ) {
130 130
 
131
-		if( ! $statement instanceof \PDOStatement  ) {
131
+		if( !$statement instanceof \PDOStatement ) {
132 132
 
133 133
 			$this->connect();
134 134
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 		if( $this->dsn->isMySQL() )
357 357
         	$char = '`';
358 358
 
359
-		return $char. $name. $char;
359
+		return $char.$name.$char;
360 360
 
361 361
 	}
362 362
 
@@ -450,10 +450,10 @@  discard block
 block discarded – undo
450 450
 		if( !$charset ) 
451 451
 			throw new DatabaseException('No character set specified');
452 452
 
453
-		$sql = 'SET NAMES '. $this->pdo->quote($charset);
453
+		$sql = 'SET NAMES '.$this->pdo->quote($charset);
454 454
 
455 455
 		if( $collation )
456
-			$sql .= ' COLLATE '. $this->pdo->quote($collation);
456
+			$sql .= ' COLLATE '.$this->pdo->quote($collation);
457 457
 
458 458
 		$this->pdo->exec($sql);
459 459
 
Please login to merge, or discard this patch.
src/support/DatabaseTree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@
 block discarded – undo
349 349
 			$offset = (int) $offset['depth'];
350 350
 
351 351
 			foreach( $data as $id => $item ) {
352
-				$tree[$id] = str_repeat('|-- ', (int) $item['depth'] - $offset). $item['name'];
352
+				$tree[$id] = str_repeat('|-- ', (int) $item['depth'] - $offset).$item['name'];
353 353
 			}
354 354
 
355 355
 		}
Please login to merge, or discard this patch.
src/GenericConnectionManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		];
93 93
 
94 94
 		if( !isset($factories[$dsn->type]) )
95
-			throw new ConfigurationException('Invalid database type: '. $dsn->type);
95
+			throw new ConfigurationException('Invalid database type: '.$dsn->type);
96 96
 
97 97
 		$factory = $factories[$dsn->type];
98 98
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		elseif( is_array($dsn) )
114 114
 			return new DSN($dsn);
115 115
 		else
116
-			throw new ConfigurationException('Invalid DSN: '. $dsn);
116
+			throw new ConfigurationException('Invalid DSN: '.$dsn);
117 117
 	}
118 118
 
119 119
 	/**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		if( !$name )
153 153
 			throw new DatabaseException('Managed database connections must have a name');
154 154
 		if( $this->has($name) )
155
-			throw new DatabaseException('Connection already exists with name: '. $name);
155
+			throw new DatabaseException('Connection already exists with name: '.$name);
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
src/DSN.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 		// no point continuing if it went wrong
41 41
 		if( !$parts || empty($parts['scheme']) )
42
-			throw new ConfigurationException('Invalid DSN string: '. $config);
42
+			throw new ConfigurationException('Invalid DSN string: '.$config);
43 43
 
44 44
 		// use a closure to save loads of duplicate logic
45 45
 		$select = function( $k, array $arr ) {
@@ -141,22 +141,22 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public function toString() {
143 143
 
144
-		$str = $this->config['type']. '://';
144
+		$str = $this->config['type'].'://';
145 145
 
146 146
 		if( $this->config['user'] ) {
147 147
 			$str .= $this->config['user'];
148 148
 			if( $this->config['pass'] )
149
-				$str .= ':'. $this->config['pass'];
149
+				$str .= ':'.$this->config['pass'];
150 150
 			$str .= '@';
151 151
 		}
152 152
 
153 153
 		if( $this->config['host'] ) {
154 154
 			$str .= $this->config['host'];
155 155
 			if( $this->config['port'] )
156
-				$str .= ':'. $this->config['port'];
156
+				$str .= ':'.$this->config['port'];
157 157
 		}
158 158
 
159
-		$str .= '/'. $this->config['db'];
159
+		$str .= '/'.$this->config['db'];
160 160
 
161 161
 		if( $this->config['options'] ) {
162 162
 			$str .= '?';
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 				break;
204 204
 
205 205
 			default:
206
-				throw new ConfigurationException('Invalid database type: '. $config['type']);
206
+				throw new ConfigurationException('Invalid database type: '.$config['type']);
207 207
 
208 208
 		}
209 209
 
Please login to merge, or discard this patch.
src/query/BaseQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 		foreach( $this->where as $i => $clause ) {
210 210
 			if( is_array($clause) )
211 211
 				$clause = implode(' ', $clause);
212
-			$sql[] = ($i ? 'AND ' : 'WHERE '). $clause;
212
+			$sql[] = ($i ? 'AND ' : 'WHERE ').$clause;
213 213
 		}
214 214
 
215 215
 		return $sql;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		if( $this->order ) {
224 224
 			$order = 'ORDER BY ';
225 225
 			foreach( $this->order as $column => $dir ) {
226
-				$order .= $column. ' '. $dir. ', ';
226
+				$order .= $column.' '.$dir.', ';
227 227
 			}
228 228
 			$sql[] = trim($order, ', ');
229 229
 		}
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		if( strpos($spec, '(') !== false )
263 263
 			return $spec;
264 264
 
265
-		foreach( [' AS ', ' ', '.'] as $sep) {
265
+		foreach( [' AS ', ' ', '.'] as $sep ) {
266 266
 			if( $pos = strripos($spec, $sep) ) {
267 267
 				return
268 268
 					$this->quoteIdentifier(substr($spec, 0, $pos)).
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			$name = substr($name, $pos + 1);
324 324
 
325 325
 		if( isset($suffixes[$operator]) )
326
-			$name .= '_'. $suffixes[$operator];
326
+			$name .= '_'.$suffixes[$operator];
327 327
 
328 328
 		return $name;
329 329
 
Please login to merge, or discard this patch.
src/query/Insert.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@
 block discarded – undo
85 85
 	protected function compile() {
86 86
 
87 87
 		$sql = [
88
-			($this->ignore ? 'INSERT IGNORE' : 'INSERT'). ' '. $this->into,
89
-			'('. implode(', ', $this->columns). ')',
88
+			($this->ignore ? 'INSERT IGNORE' : 'INSERT').' '.$this->into,
89
+			'('.implode(', ', $this->columns).')',
90 90
 			'VALUES',
91 91
 		];
92 92
 
Please login to merge, or discard this patch.
src/query/Update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			$end++;
76 76
 		}
77 77
 
78
-		$sql[0]    = 'SET '. $sql[0];
78
+		$sql[0]    = 'SET '.$sql[0];
79 79
 		$sql[$end] = trim($sql[$end], ',');
80 80
 
81 81
 		return $sql;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 		if( $this->limit ) {
90 90
 			$sql[] = "LIMIT :limit";
91
-			$this->params['limit']  = $this->limit;
91
+			$this->params['limit'] = $this->limit;
92 92
 		}
93 93
 
94 94
 		return $sql;
Please login to merge, or discard this patch.
src/query/Select.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 
117 117
 		return array_merge(
118 118
 			[
119
-				($this->distinct ? 'SELECT DISTINCT' : 'SELECT'). ' '. $cols,
120
-				'FROM '. $this->from,
119
+				($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' '.$cols,
120
+				'FROM '.$this->from,
121 121
 			],
122 122
 			$this->compileJoins(),
123 123
 			$this->compileWhere(),
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 		$sql = [];
159 159
 
160 160
 		if( $this->group )
161
-			$sql[] = 'GROUP BY '. implode(', ', $this->group);
161
+			$sql[] = 'GROUP BY '.implode(', ', $this->group);
162 162
 
163 163
 		return $sql;
164 164
 
Please login to merge, or discard this patch.