Completed
Push — master ( 6c95d6...0ca878 )
by smiley
02:15
created
src/Query/StatementInterface.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -17,6 +17,10 @@
 block discarded – undo
17 17
 interface StatementInterface{
18 18
 
19 19
 	public function sql():string;
20
+
21
+	/**
22
+	 * @return void
23
+	 */
20 24
 	public function execute();
21 25
 	public function quote(string $str):string;
22 26
 
Please login to merge, or discard this patch.
src/Query/UpdateInterface.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -16,7 +16,14 @@
 block discarded – undo
16 16
  */
17 17
 interface UpdateInterface extends StatementInterface{
18 18
 
19
+	/**
20
+	 * @return void
21
+	 */
19 22
 	public function table();
23
+
24
+	/**
25
+	 * @return void
26
+	 */
20 27
 	public function where();
21 28
 #	public function orWhere();
22 29
 
Please login to merge, or discard this patch.
tests/Drivers/DriverTestAbstract.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\DatabaseTest\Drivers;
14 14
 
15
-use chillerlan\Database\Drivers\DBDriverInterface;
16
-use chillerlan\DatabaseTest\TestAbstract;
17 15
 use Psr\SimpleCache\CacheInterface;
16
+use chillerlan\DatabaseTest\TestAbstract;
17
+use chillerlan\Database\Drivers\DBDriverInterface;
18 18
 
19 19
 abstract class DriverTestAbstract extends TestAbstract{
20 20
 
Please login to merge, or discard this patch.
src/Query/SelectAbstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
 		$sql = 'SELECT ';
36 36
 
37 37
 		$sql .= $this->distinct ? 'DISTINCT ' : '';
38
-		$sql .= implode($glue , $this->cols).PHP_EOL;
39
-		$sql .= !empty($this->from) ? 'FROM '.implode($glue , $this->from) : '';
38
+		$sql .= implode($glue, $this->cols).PHP_EOL;
39
+		$sql .= !empty($this->from) ? 'FROM '.implode($glue, $this->from) : '';
40 40
 		$sql .= !empty($this->where) ? PHP_EOL.'WHERE ' : '';
41 41
 		$sql .= !empty($this->groupby) ? PHP_EOL.'GROUP BY '.implode($glue, $this->groupby) : '';
42 42
 		$sql .= !empty($this->orderby) ? PHP_EOL.'ORDER BY '.implode($glue, $this->orderby) : '';
Please login to merge, or discard this patch.
src/Query/CreateTableAbstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
 	protected $primaryKey;
23 23
 	protected $cols = [];
24 24
 
25
-	public function ifNotExists():CreateTableInterface{return $this->_ifNotExists();}
26
-	public function name(string $dbname = null):CreateTableInterface{return $this->_name($dbname);}
25
+	public function ifNotExists():CreateTableInterface{return $this->_ifNotExists(); }
26
+	public function name(string $dbname = null):CreateTableInterface{return $this->_name($dbname); }
27 27
 
28 28
 	public function execute(){
29 29
 		// TODO: Implement execute() method.
Please login to merge, or discard this patch.
src/Query/CreateAbstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 		return (new class($this->DBDriver, $this->dialect) extends StatementAbstract implements CreateDatabaseInterface{
29 29
 			use CharsetTrait, IfNotExistsTrait, NameTrait;
30 30
 
31
-			public function ifNotExists():CreateDatabaseInterface{return $this->_ifNotExists();}
32
-			public function name(string $dbname = null):CreateDatabaseInterface{return $this->_name($dbname);}
33
-			public function collate(string $collation):CreateDatabaseInterface{return $this->_collate($collation);}
31
+			public function ifNotExists():CreateDatabaseInterface{return $this->_ifNotExists(); }
32
+			public function name(string $dbname = null):CreateDatabaseInterface{return $this->_name($dbname); }
33
+			public function collate(string $collation):CreateDatabaseInterface{return $this->_collate($collation); }
34 34
 
35 35
 			public function sql():string{
36 36
 
Please login to merge, or discard this patch.
src/Query/Dialects/MySQL/Select.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 	 *
24 24
 	 * @return \chillerlan\Database\Query\SelectInterface
25 25
 	public function from(array $expressions):SelectInterface{
26
-		* // @todo: index hint
27
- *
26
+	 * // @todo: index hint
27
+	 *
28 28
 * return $this;
29
-	* }
29
+	 * }
30 30
 */
31 31
 
32 32
 
Please login to merge, or discard this patch.
src/Query/Dialects/MySQL/CreateTable.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
 		$type = strtoupper(trim($type));
55 55
 		$nolengthtypes = ['DATE', 'TINYBLOB', 'TINYTEXT', 'BLOB', 'TEXT', 'MEDIUMBLOB',
56
-		                  'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID'];
56
+						  'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID'];
57 57
 
58 58
 		$field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes)
59 59
 			? $type.'('. $length . ')'
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 class CreateTable extends CreateTableAbstract{
20 20
 	use CharsetTrait;
21 21
 
22
-	public function collate(string $collation):CreateTableInterface{return $this->_collate($collation);}
22
+	public function collate(string $collation):CreateTableInterface{return $this->_collate($collation); }
23 23
 
24 24
 	public function sql():string{
25 25
 #		var_dump($this->cols);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		                  'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID'];
57 57
 
58 58
 		$field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes)
59
-			? $type.'('. $length . ')'
59
+			? $type.'('.$length.')'
60 60
 			: $type;
61 61
 
62 62
 		if($attribute){
Please login to merge, or discard this patch.
tests/Query/QueryTest.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 
12 12
 namespace chillerlan\DatabaseTest\Query;
13 13
 
14
-use chillerlan\Database\Drivers\PDO\PDOMySQLDriver;
14
+use chillerlan\DatabaseTest\TestAbstract;
15 15
 use chillerlan\Database\DBQuery;
16
+use chillerlan\Database\Drivers\PDO\PDOMySQLDriver;
16 17
 use chillerlan\Database\Query\CreateInterface;
17 18
 use chillerlan\Database\Query\CreateTableInterface;
18 19
 use chillerlan\Database\Query\SelectInterface;
19 20
 use chillerlan\Database\Query\StatementInterface;
20
-use chillerlan\DatabaseTest\TestAbstract;
21 21
 
22 22
 /**
23 23
  * Class QueryTest
Please login to merge, or discard this patch.