Passed
Push — master ( 749535...2255b4 )
by smiley
01:29
created
src/Dialects/Firebird.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
 
188 188
 	/** @inheritdoc */
189 189
 	public function truncate(string $table):array{
190
-		$sql = ['DELETE FROM'];// RECREATE TABLE [table spec] ...stupid firebird 2.5
190
+		$sql = ['DELETE FROM']; // RECREATE TABLE [table spec] ...stupid firebird 2.5
191 191
 		$sql[] = $this->quote($table);
192 192
 
193 193
 		return $sql;
Please login to merge, or discard this patch.
src/Dialects/SQLite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 
109 109
 	/** @inheritdoc */
110 110
 	public function truncate(string $table):array{
111
-		$sql = ['DELETE FROM'];// ??? sqlite
111
+		$sql = ['DELETE FROM']; // ??? sqlite
112 112
 		$sql[] = $this->quote($table);
113 113
 
114 114
 		return $sql;
Please login to merge, or discard this patch.
src/Dialects/Postgres.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 				throw new QueryException('postgres insert on conflict: no conflict target given');
70 70
 			}
71 71
 
72
-			$sql[] =  'ON CONFLICT ('.$this->quote($conflictTarget).') DO';
72
+			$sql[] = 'ON CONFLICT ('.$this->quote($conflictTarget).') DO';
73 73
 
74 74
 			switch($onConflict){
75 75
 				case 'IGNORE':
Please login to merge, or discard this patch.
src/DatabaseAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 			throw new DatabaseException('invalid driver interface');
66 66
 		}
67 67
 
68
-		$this->query   = new QueryBuilder($this->driver, $this->logger);
68
+		$this->query = new QueryBuilder($this->driver, $this->logger);
69 69
 	}
70 70
 
71 71
 	/**
Please login to merge, or discard this patch.
src/Query/WhereTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 					: $this->dialect->quote($val1)
63 63
 			];
64 64
 
65
-			if(in_array($operator, ['IN', 'NOT IN', 'ANY', 'SOME',], true)){
65
+			if(in_array($operator, ['IN', 'NOT IN', 'ANY', 'SOME', ], true)){
66 66
 
67 67
 				if(is_array($val2)){
68 68
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 				elseif(in_array(strtolower($val2), ['null', 'false', 'true', 'unknown'], true)){
101 101
 					$where[] = strtoupper($val2);
102 102
 				}
103
-				else {
103
+				else{
104 104
 
105 105
 					if($bind){
106 106
 						$where[] = '?';
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 		$where = [];
160 160
 
161 161
 		foreach($this->where as $k => $v){
162
-			$last = $this->where[$k-1] ?? false;
162
+			$last = $this->where[$k - 1] ?? false;
163 163
 
164
-			if(in_array($v,  $this->joinArgs + ['(', ')'], true)){
164
+			if(in_array($v, $this->joinArgs + ['(', ')'], true)){
165 165
 				$where[] = $v;
166 166
 
167 167
 				continue;
Please login to merge, or discard this patch.
src/Dialects/MySQL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 			$sql[] = 'TEMPORARY';
78 78
 		}
79 79
 
80
-		$sql[] = 'TABLE' ;
80
+		$sql[] = 'TABLE';
81 81
 
82 82
 		if($ifNotExists){
83
-			$sql[] =  'IF NOT EXISTS' ;
83
+			$sql[] = 'IF NOT EXISTS';
84 84
 		}
85 85
 
86
-		$sql[] =  $this->quote($table);
86
+		$sql[] = $this->quote($table);
87 87
 
88 88
 		if(!empty($cols)){
89 89
 			$sql[] = '(';
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			if(!empty($primaryKey)){
93 93
 				$sql[] = ', PRIMARY KEY (';
94 94
 				$sql[] = $this->quote($primaryKey);
95
-				$sql[] =  ')';
95
+				$sql[] = ')';
96 96
 			}
97 97
 
98 98
 			$sql[] = ')';
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		                  'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID'];
128 128
 
129 129
 		$field[] = (is_int($length) || (is_string($length) && count(explode(',', $length)) === 2)) && !in_array($type, $nolengthtypes, true)
130
-			? $type.'('. $length . ')'
130
+			? $type.'('.$length.')'
131 131
 			: $type;
132 132
 
133 133
 		if($attribute){
Please login to merge, or discard this patch.
src/Query/MultiQueryTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 	/** @inheritdoc */
32 32
 	public function callback(iterable $values, callable $callback):bool{
33
-		$sql    = $this->sql(true);
33
+		$sql = $this->sql(true);
34 34
 
35 35
 		$this->logger->debug('MultiQueryTrait::callback()', ['method' => __METHOD__, 'sql' => $sql, 'val' => $values]);
36 36
 
Please login to merge, or discard this patch.
src/Dialects/DialectAbstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 		// @todo: fixme, cleanup
194 194
 		// errors on [alias => col, alias, alias => col...]
195
-		$_col = function ($expr1, $expr2 = null, $func = null):string {
195
+		$_col = function($expr1, $expr2 = null, $func = null):string {
196 196
 			switch(true){
197 197
 				case  $expr2 && $func:
198 198
 					$col = sprintf('%s(%s) AS %s', strtoupper($func), $expr1, $this->quote($expr2));
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
 	/** @inheritdoc */
235 235
 	public function from(array $expressions):array {
236 236
 
237
-		$_from = function (string $table, string $ref = null):string {
237
+		$_from = function(string $table, string $ref = null):string {
238 238
 			// @todo: quotes
239 239
 			$from = $this->quote($table);
240 240
 
241 241
 			if($ref){
242
-				$from = sprintf('%s AS %s', $this->quote($ref), $this->quote($table));// @todo: index hint
242
+				$from = sprintf('%s AS %s', $this->quote($ref), $this->quote($table)); // @todo: index hint
243 243
 			}
244 244
 
245 245
 			return $from;
Please login to merge, or discard this patch.
src/Result.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -343,9 +343,9 @@
 block discarded – undo
343 343
 	public function seek($pos):void{
344 344
 		$this->rewind();
345 345
 
346
-		for( ; $this->offset < $pos; ){
346
+		for(; $this->offset < $pos;){
347 347
 
348
-			if(!\next($this->array)) {
348
+			if(!\next($this->array)){
349 349
 				throw new \OutOfBoundsException('invalid seek position: '.$pos);
350 350
 			}
351 351
 
Please login to merge, or discard this patch.