Completed
Push — master ( d508c6...ead087 )
by smiley
02:37
created
src/Query/Dialects/Postgres/CreateTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 		$n = explode('.', $this->name);
35 35
 
36
-		$sql .= $this->quote($n[count($n)-1]);
36
+		$sql .= $this->quote($n[count($n) - 1]);
37 37
 
38 38
 		if(!empty($this->cols)){
39 39
 			$sql .= ' ('.PHP_EOL."\t".implode(','.PHP_EOL."\t", $this->cols);
40 40
 
41 41
 			if($this->primaryKey){
42
-				$sql .=','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')';
42
+				$sql .= ','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')';
43 43
 			}
44 44
 
45 45
 			$sql .= PHP_EOL.')';
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
 		if((is_int($length) || is_string($length) && count(explode(',', $length)) === 2)
85 85
 		   && in_array($type, ['BIT', 'VARBIT', 'CHAR', 'VARCHAR', 'DECIMAL', 'NUMERIC', 'TIME', 'TIMESTAMP', 'INTERVAL'])){
86
-			$field[] = $type_translation.'('. $length . ')';
86
+			$field[] = $type_translation.'('.$length.')';
87 87
 		}
88 88
 		else{
89 89
 			$field[] = $type_translation;
Please login to merge, or discard this patch.
src/Query/Dialects/Firebird/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@
 block discarded – undo
43 43
 		$sql  = 'SELECT ';
44 44
 		$sql .= $this->limit ? 'FIRST ? SKIP ? ' : '';
45 45
 		$sql .= $this->distinct ? 'DISTINCT ' : '';
46
-		$sql .= !empty($this->cols) ? implode($glue , $this->cols).PHP_EOL : '* ';
47
-		$sql .= !empty($this->from) ? 'FROM '.implode($glue , $this->from) : '';
46
+		$sql .= !empty($this->cols) ? implode($glue, $this->cols).PHP_EOL : '* ';
47
+		$sql .= !empty($this->from) ? 'FROM '.implode($glue, $this->from) : '';
48 48
 		$sql .= $this->_getWhere();
49 49
 		$sql .= !empty($this->groupby) ? PHP_EOL.'GROUP BY '.implode($glue, $this->groupby) : '';
50 50
 		$sql .= !empty($this->orderby) ? PHP_EOL.'ORDER BY '.implode($glue, $this->orderby) : '';
Please login to merge, or discard this patch.
src/Query/Dialects/Firebird/CreateTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 		$n = explode('.', $this->name);
34 34
 
35
-		$sql .= $this->quote($n[count($n)-1]);
35
+		$sql .= $this->quote($n[count($n) - 1]);
36 36
 
37 37
 		$cols = [];
38 38
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 			$field[] = $type_translation;
99 99
 		}
100 100
 		else if(in_array($type, ['CHAR', 'VARCHAR', 'DECIMAL', 'NUMERIC'])){
101
-			$field[] = $type.'('. $length . ')';
101
+			$field[] = $type.'('.$length.')';
102 102
 		}
103 103
 		else{
104 104
 			$field[] = $type;
105 105
 		}
106 106
 
107 107
 
108
-		if($isNull ===  false && !in_array($type, ['DATE', 'TIME', 'TIMESTAMP'])){
108
+		if($isNull === false && !in_array($type, ['DATE', 'TIME', 'TIMESTAMP'])){
109 109
 			$field[] = 'NOT NULL';
110 110
 		}
111 111
 
Please login to merge, or discard this patch.
src/Query/Dialects/SQLite/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
 
38 38
 		$sql  = 'SELECT ';
39 39
 		$sql .= $this->distinct ? 'DISTINCT ' : '';
40
-		$sql .= !empty($this->cols) ? implode($glue , $this->cols).PHP_EOL : '* ';
41
-		$sql .= 'FROM '.implode($glue , $this->from);
40
+		$sql .= !empty($this->cols) ? implode($glue, $this->cols).PHP_EOL : '* ';
41
+		$sql .= 'FROM '.implode($glue, $this->from);
42 42
 		$sql .= $this->_getWhere();
43 43
 		$sql .= !empty($this->groupby) ? PHP_EOL.'GROUP BY '.implode($glue, $this->groupby) : '';
44 44
 		$sql .= !empty($this->orderby) ? PHP_EOL.'ORDER BY '.implode($glue, $this->orderby) : '';
Please login to merge, or discard this patch.
src/Query/Dialects/SQLite/CreateTable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 
45 45
 		$n = explode('.', $this->name);
46 46
 
47
-		$sql .= $this->quote($n[count($n)-1]);
47
+		$sql .= $this->quote($n[count($n) - 1]);
48 48
 
49 49
 		if(!empty($this->cols)){
50 50
 			$sql .= ' ('.PHP_EOL."\t".implode(','.PHP_EOL."\t", $this->cols);
51 51
 
52 52
 			if($this->primaryKey){
53
-				$sql .=','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey)
53
+				$sql .= ','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey)
54 54
 				       .(in_array($this->dir, ['ASC', 'DESC']) ? $this->dir : '').')';
55 55
 			}
56 56
 
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 
89
-		if(is_int($length)&& in_array($type, ['CHAR', 'NCHAR','VARCHAR', 'NVARCHAR', 'CHARACTER'])
89
+		if(is_int($length) && in_array($type, ['CHAR', 'NCHAR', 'VARCHAR', 'NVARCHAR', 'CHARACTER'])
90 90
 		    || is_string($length) && count(explode(',', $length)) === 2 && $type === 'DECIMAL'){
91
-			$field[] = $type_translation.'('. $length . ')';
91
+			$field[] = $type_translation.'('.$length.')';
92 92
 		}
93 93
 		else{
94 94
 			$field[] = $type_translation;
Please login to merge, or discard this patch.
tests/Query/QueryTestAbstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 		$insert
126 126
 			->into(self::TEST_TABLENAME)
127 127
 			->values([
128
-				['id' => 1, 'hash' => md5(1), 'data' => 'foo', 'value' => 123.456,    'active' => 0],
128
+				['id' => 1, 'hash' => md5(1), 'data' => 'foo', 'value' => 123.456, 'active' => 0],
129 129
 				['id' => 2, 'hash' => md5(2), 'data' => 'foo', 'value' => 123.456789, 'active' => 1],
130
-				['id' => 3, 'hash' => md5(3), 'data' => 'foo', 'value' => 123.456,    'active' => 0],
130
+				['id' => 3, 'hash' => md5(3), 'data' => 'foo', 'value' => 123.456, 'active' => 0],
131 131
 			])
132 132
 		;
133 133
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		$select = $this->statement->select;
179 179
 		$select
180 180
 			->from([self::TEST_TABLENAME])
181
-			->where('id', [1,2,3], 'in')
181
+			->where('id', [1, 2, 3], 'in')
182 182
 			->orderby(['id' => 'desc'])
183 183
 		;
184 184
 		$result = $select->execute();
Please login to merge, or discard this patch.