Completed
Push — master ( 47c098...6c95d6 )
by smiley
02:23
created
src/DBResult.php 1 patch
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database;
14 14
 
15
-use ArrayAccess, Countable, Iterator;
15
+use ArrayAccess;
16
+use Countable;
17
+use Iterator;
16 18
 use chillerlan\Database\Traits\{Enumerable, Magic};
17 19
 
18 20
 /**
Please login to merge, or discard this patch.
src/DBOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 	 *
130 130
 	 * @var int
131 131
 	 */
132
-	public $sqlite_flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE;
132
+	public $sqlite_flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE;
133 133
 
134 134
 	/**
135 135
 	 * An optional encryption key used when encrypting and decrypting an SQLite database.
Please login to merge, or discard this patch.
src/DBResultRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	 *
44 44
 	 * @return mixed|null
45 45
 	 */
46
-	public function __get(string $name) {
46
+	public function __get(string $name){
47 47
 
48 48
 		if(isset($this->array[$name])){
49 49
 			return $this->array[$name];
Please login to merge, or discard this patch.
tests/DBResultTest.php 1 patch
Unused Use Statements   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,11 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\DatabaseTest;
14 14
 
15
+use ArrayAccess;
16
+use Countable;
17
+use Iterator;
15 18
 use chillerlan\Database\DBResult;
16
-use Iterator, ArrayAccess, Countable, stdClass;
19
+use stdClass;
17 20
 
18 21
 class DBResultTest extends TestAbstract{
19 22
 
Please login to merge, or discard this patch.
src/Drivers/PDO/PDODriverAbstract.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,16 +161,16 @@
 block discarded – undo
161 161
 	 *
162 162
 	 * @return void
163 163
 	 */
164
-	protected function bindParams(PDOStatement &$stmt, array $values){
164
+	protected function bindParams(PDOStatement&$stmt, array $values){
165 165
 		$param_no = 1;
166 166
 
167 167
 		foreach($values as $v){
168 168
 
169 169
 			switch(gettype($v)){
170 170
 				case 'boolean': $type = PDO::PARAM_BOOL; break;
171
-				case 'integer': $type = PDO::PARAM_INT;  break;
171
+				case 'integer': $type = PDO::PARAM_INT; break;
172 172
 				case 'NULL'   : $type = PDO::PARAM_NULL; break;
173
-				default:        $type = PDO::PARAM_STR;  break;
173
+				default:        $type = PDO::PARAM_STR; break;
174 174
 			}
175 175
 
176 176
 			$stmt->bindValue($param_no, $v, $type);
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
 
15 15
 use chillerlan\Database\DBException;
16 16
 use chillerlan\Database\Drivers\{DBDriverAbstract, DBDriverInterface};
17
-use PDO, PDOStatement;
17
+use PDO;
18
+use PDOStatement;
18 19
 
19 20
 /**
20 21
  *
Please login to merge, or discard this patch.
src/Traits/Magic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@
 block discarded – undo
18 18
  */
19 19
 trait Magic{
20 20
 
21
-	public function __get(string $name) {
21
+	public function __get(string $name){
22 22
 		return $this->get($name);
23 23
 	}
24 24
 
25
-	public function __set(string $name, $value) {
25
+	public function __set(string $name, $value){
26 26
 		$this->set($name, $value);
27 27
 	}
28 28
 
29
-	private function get(string $name) {
29
+	private function get(string $name){
30 30
 		$method = 'magic_get_'.$name;
31 31
 
32 32
 		return method_exists($this, $method) ? $this->$method() : null;
33 33
 	}
34 34
 
35
-	private function set(string $name, $value) {
35
+	private function set(string $name, $value){
36 36
 		$method = 'magic_set_'.$name;
37 37
 
38 38
 		if(method_exists($this, $method)){
Please login to merge, or discard this patch.
src/Drivers/DBDriverAbstract.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\Database\Drivers;
14 14
 
15
+use Psr\SimpleCache\CacheInterface;
15 16
 use chillerlan\Database\DBException;
16 17
 use chillerlan\Database\DBOptions;
17 18
 use chillerlan\Database\DBResult;
18 19
 use chillerlan\Database\Traits\Magic;
19
-use Psr\SimpleCache\CacheInterface;
20 20
 
21 21
 /**
22 22
  * @property string   $dialect
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.