Completed
Push — master ( 52213f...9c9a69 )
by smiley
04:03
created
src/Drivers/DriverAbstract.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 	/**
105 105
 	 * @param string   $sql
106 106
 	 * @param iterable $data
107
-	 * @param          $callback
107
+	 * @param          callable $callback
108 108
 	 *
109 109
 	 * @return bool
110 110
 	 */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
 				$sql,
176 176
 				$values !== null ? $values : [],
177 177
 				$index,
178
-				$assoc  !== null ? $assoc  : true
178
+				$assoc !== null ? $assoc : true
179 179
 			);
180 180
 		}
181 181
 		catch(\Exception $e){
Please login to merge, or discard this patch.
src/Drivers/MySQLiDrv.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database\Drivers;
14 14
 
15
+use Exception;
15 16
 use chillerlan\Database\Dialects\MySQL;
16 17
 use chillerlan\Database\Result;
17
-use Exception;
18 18
 use mysqli;
19 19
 
20 20
 /**
Please login to merge, or discard this patch.
src/Drivers/PDODriverAbstract.php 2 patches
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database\Drivers;
14 14
 
15
-use PDO, PDOStatement;
15
+use PDO;
16
+use PDOStatement;
16 17
 
17 18
 /**
18 19
  * @property \PDO $db
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 	}
122 122
 
123 123
 	/** @inheritdoc */
124
-	public function getServerInfo():?string{
124
+	public function getServerInfo(): ?string{
125 125
 		return $this->db->getAttribute(PDO::ATTR_SERVER_INFO);
126 126
 	}
127 127
 
Please login to merge, or discard this patch.
src/Drivers/PostgreSQL.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 	}
87 87
 
88 88
 	/**
89
-	 * @param             $result
89
+	 * @param             resource $result
90 90
 	 * @param string|null $index
91 91
 	 * @param bool        $assoc
92 92
 	 *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	/** @inheritdoc */
77
-	public function getServerInfo():?string{
77
+	public function getServerInfo(): ?string{
78 78
 		$ver = pg_version($this->db);
79 79
 
80 80
 		return 'PostgreSQL '.$ver['server'].' ('.$ver['server_encoding'].', date style: '.$ver['DateStyle'].', time zone: '.$ver['TimeZone'].')';
Please login to merge, or discard this patch.
src/Query/Statement.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@
 block discarded – undo
24 24
 	 * @param \chillerlan\Database\Drivers\DriverInterface $db
25 25
 	 * @param \chillerlan\Database\Dialects\Dialect        $dialect
26 26
 	 * @param \Psr\Log\LoggerInterface|null                $logger
27
+	 * @return void
27 28
 	 */
28 29
 	public function __construct(DriverInterface $db, Dialect $dialect, LoggerInterface $logger = null);
29 30
 
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database\Query;
14 14
 
15
+use Psr\Log\LoggerInterface;
15 16
 use chillerlan\Database\Dialects\Dialect;
16 17
 use chillerlan\Database\Drivers\DriverInterface;
17
-use Psr\Log\LoggerInterface;
18 18
 
19 19
 interface Statement{
20 20
 
Please login to merge, or discard this patch.
src/ResultInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@
 block discarded – undo
22 22
 	 * @param iterable|null $data
23 23
 	 * @param string|null   $sourceEncoding
24 24
 	 * @param string        $destEncoding
25
+	 * @return void
25 26
 	 */
26 27
 	public function __construct(iterable $data = null, string $sourceEncoding = null, string $destEncoding = null);
27 28
 
Please login to merge, or discard this patch.
src/Query/WhereTrait.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 				elseif(in_array(strtolower($val2), ['null', 'false', 'true', 'unknown'], true)){
100 100
 					$where[] = strtoupper($val2);
101 101
 				}
102
-				else {
102
+				else{
103 103
 
104 104
 					if($bind){
105 105
 						$where[] = '?';
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 		$where = [];
159 159
 
160 160
 		foreach($this->where as $k => $v){
161
-			$last = $this->where[$k-1] ?? false;
161
+			$last = $this->where[$k - 1] ?? false;
162 162
 
163
-			if(in_array($v,  $this->joinArgs + ['(', ')'], true)){
163
+			if(in_array($v, $this->joinArgs + ['(', ')'], true)){
164 164
 				$where[] = $v;
165 165
 
166 166
 				continue;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 				elseif(in_array(strtolower($val2), ['null', 'false', 'true', 'unknown'], true)){
100 100
 					$where[] = strtoupper($val2);
101 101
 				}
102
-				else {
102
+				else{
103 103
 
104 104
 					if($bind){
105 105
 						$where[] = '?';
Please login to merge, or discard this patch.
src/Query/QueryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -550,8 +550,8 @@
 block discarded – undo
550 550
 								: $this->dialect->quote($k).' = '.$v; //$this->db->escape($v)
551 551
 						}
552 552
 						else{
553
-							$this->set[]        = $this->dialect->quote($k).' = ?';
554
-							$this->addBindValue($k, is_bool($v) ? (int)$v : $v);// avoid errors with PDO firebird & mysql
553
+							$this->set[] = $this->dialect->quote($k).' = ?';
554
+							$this->addBindValue($k, is_bool($v) ? (int)$v : $v); // avoid errors with PDO firebird & mysql
555 555
 						}
556 556
 					}
557 557
 				}
Please login to merge, or discard this patch.
src/Drivers/MSSqlSrv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 	}
169 169
 
170 170
 	/** @inheritdoc */
171
-	public function getServerInfo():?string{
171
+	public function getServerInfo(): ?string{
172 172
 
173 173
 		if(gettype($this->db) === 'resource'){
174 174
 			$info = sqlsrv_server_info($this->db);
Please login to merge, or discard this patch.