Completed
Push — master ( f08c1d...ffbb02 )
by smiley
02:22
created
src/Query/SelectAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		$from = $table;
91 91
 
92 92
 		if($ref){
93
-			$from = sprintf('%s AS %s', $table, $ref);// @todo: index hint
93
+			$from = sprintf('%s AS %s', $table, $ref); // @todo: index hint
94 94
 		}
95 95
 
96 96
 		$this->from[$ref ?? $table] = $from;
Please login to merge, or discard this patch.
src/Query/Traits/WhereTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 		$where = [];
142 142
 
143 143
 		foreach($this->where as $k => $v){
144
-			$last = $this->where[$k-1] ?? false;
144
+			$last = $this->where[$k - 1] ?? false;
145 145
 #			print_r([$last, $v]);
146 146
 
147 147
 			if(in_array($v, ['AND', 'OR', 'XOR', '(', ')'], true)){
Please login to merge, or discard this patch.
src/Query/Dialects/MySQL/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 
30 30
 		$sql  = 'SELECT ';
31 31
 		$sql .= $this->distinct ? 'DISTINCT ' : '';
32
-		$sql .= implode($glue , $this->cols).PHP_EOL;
33
-		$sql .= !empty($this->from) ? 'FROM '.implode($glue , $this->from) : '';
32
+		$sql .= implode($glue, $this->cols).PHP_EOL;
33
+		$sql .= !empty($this->from) ? 'FROM '.implode($glue, $this->from) : '';
34 34
 		$sql .= $this->_getWhere();
35 35
 		$sql .= !empty($this->groupby) ? PHP_EOL.'GROUP BY '.implode($glue, $this->groupby) : '';
36 36
 		$sql .= !empty($this->orderby) ? PHP_EOL.'ORDER BY '.implode($glue, $this->orderby) : '';
Please login to merge, or discard this patch.
tests/Query/QueryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 			->where('t2.what', 3)
55 55
 			->openBracket('and')
56 56
 			->where('t1.what', 't2.what', '>', false)
57
-			->where('t2.what', [1,2,3], 'in')
57
+			->where('t2.what', [1, 2, 3], 'in')
58 58
 			->closeBracket()
59 59
 			->where('t3.what', $this->statement->select->cols(['foo'])->from(['nope'])->where('bar', 42), 'in', true, 'or')
60 60
 			->groupby(['foo', 'bar'])
Please login to merge, or discard this patch.