Completed
Push — master ( ffbb02...68e5b2 )
by smiley
02:42
created
src/Drivers/DBDriverAbstract.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database\Drivers;
14 14
 
15
+use Psr\SimpleCache\CacheInterface;
15 16
 use chillerlan\Database\DBOptions;
16 17
 use chillerlan\Database\DBResult;
17 18
 use chillerlan\Database\Traits\Magic;
18
-use Psr\SimpleCache\CacheInterface;
19 19
 
20 20
 /**
21 21
  * @property string   $dialect
Please login to merge, or discard this patch.
src/Drivers/PDO/PDODriverAbstract.php 1 patch
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@
 block discarded – undo
15 15
 use chillerlan\Database\Drivers\{
16 16
 	DBDriverAbstract, DBDriverException, DBDriverInterface
17 17
 };
18
-use PDO, PDOStatement;
18
+use PDO;
19
+use PDOStatement;
19 20
 
20 21
 /**
21 22
  * @see http://php.net/manual/pdo.constants.php
Please login to merge, or discard this patch.
src/Query/DeleteAbstract.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -25,6 +25,10 @@
 block discarded – undo
25 25
 	}
26 26
 
27 27
 	// -> *WhereTrait
28
+
29
+	/**
30
+	 * @param string $operator
31
+	 */
28 32
 	abstract protected function _addWhere($val1, $val2 = null, $operator = null, $bind = true, $join = 'AND');
29 33
 	abstract protected function _openBracket($join = null);
30 34
 	abstract protected function _closeBracket();
Please login to merge, or discard this patch.
src/Query/SelectAbstract.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -24,6 +24,10 @@
 block discarded – undo
24 24
 	protected $groupby = [];
25 25
 
26 26
 	// -> *WhereTrait
27
+
28
+	/**
29
+	 * @param string $operator
30
+	 */
27 31
 	abstract protected function _addWhere($val1, $val2 = null, $operator = null, $bind = true, $join = 'AND');
28 32
 	abstract protected function _openBracket($join = null);
29 33
 	abstract protected function _closeBracket();
Please login to merge, or discard this patch.
src/Query/UpdateAbstract.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -29,6 +29,10 @@
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	// -> *WhereTrait
32
+
33
+	/**
34
+	 * @param string $operator
35
+	 */
32 36
 	abstract protected function _addWhere($val1, $val2 = null, $operator = null, $bind = true, $join = 'AND');
33 37
 	abstract protected function _openBracket($join = null);
34 38
 	abstract protected function _closeBracket();
Please login to merge, or discard this patch.
tests/Query/QueryTestInterface.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -16,8 +16,15 @@
 block discarded – undo
16 16
  */
17 17
 interface QueryTestInterface{
18 18
 
19
+	/**
20
+	 * @return void
21
+	 */
19 22
 	public function testInstance();
20 23
 	public function testCreateDatabase();
24
+
25
+	/**
26
+	 * @return void
27
+	 */
21 28
 	public function testCreateDatabaseNoName();
22 29
 
23 30
 }
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
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
 		$sql  = 'SELECT ';
36 36
 		$sql .= $this->limit ? 'FIRST ? SKIP ?' : '';
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 .= $this->_getWhere();
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/Dialects/MySQL/CreateTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 		                  'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID'];
65 65
 
66 66
 		$field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes)
67
-			? $type.'('. $length . ')'
67
+			? $type.'('.$length.')'
68 68
 			: $type;
69 69
 
70 70
 		if($attribute){
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
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 		$where = [];
55 55
 
56 56
 		foreach($this->where as $k => $v){
57
-			$last = $this->where[$k-1] ?? false;
57
+			$last = $this->where[$k - 1] ?? false;
58 58
 
59 59
 			if(in_array($v, ['AND', 'OR', 'XOR', '(', ')'], true)){
60 60
 				$where[] = $v;
Please login to merge, or discard this patch.