Passed
Pull Request — master (#70)
by Christian
01:42 queued 19s
created
Maphper/DataSource/Database.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 	private $table;
10 10
 
11 11
 	private $fields = '*';
12
-    private $databaseSelect;
13
-    private $databaseCrud;
12
+	private $databaseSelect;
13
+	private $databaseCrud;
14 14
 
15 15
 	public function __construct($db, $table, $primaryKey = 'id', array $options = []) {
16 16
 		$options = new DatabaseOptions($db, $options);
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 
24 24
 		$defaultSort = $options->read('defaultSort') !== false ? $options->read('defaultSort')  : implode(', ', $this->primaryKey);
25 25
 
26
-        $databaseModify = new DatabaseModify($adapter, $options->getEditMode(), $table);
26
+		$databaseModify = new DatabaseModify($adapter, $options->getEditMode(), $table);
27 27
 
28
-        $this->databaseSelect = new DatabaseSelect($adapter, $databaseModify, $table, $defaultSort, $options->getCacheMode());
29
-        $this->databaseCrud = new DatabaseCrud($adapter, $databaseModify, $this->databaseSelect, $table, $this->primaryKey);
28
+		$this->databaseSelect = new DatabaseSelect($adapter, $databaseModify, $table, $defaultSort, $options->getCacheMode());
29
+		$this->databaseCrud = new DatabaseCrud($adapter, $databaseModify, $this->databaseSelect, $table, $this->primaryKey);
30 30
 
31 31
 		$databaseModify->optimizeColumns();
32 32
 	}
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	public function findByField(array $fields, $options = []) {
55
-        return $this->databaseSelect->findByField($fields, $options);
55
+		return $this->databaseSelect->findByField($fields, $options);
56 56
 	}
57 57
 
58 58
 	public function deleteByField(array $fields, array $options = []) {
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function save($data) {
63
-        $this->databaseCrud->save($data, true);
63
+		$this->databaseCrud->save($data, true);
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 		$this->primaryKey = is_array($primaryKey) ? $primaryKey : [$primaryKey];
20 20
 		$this->table = $table;
21 21
 
22
-		$this->fields = implode(',', array_map([$adapter, 'quote'], (array) $options->read('fields')));
22
+		$this->fields = implode(',', array_map([$adapter, 'quote'], (array)$options->read('fields')));
23 23
 
24
-		$defaultSort = $options->read('defaultSort') !== false ? $options->read('defaultSort')  : implode(', ', $this->primaryKey);
24
+		$defaultSort = $options->read('defaultSort') !== false ? $options->read('defaultSort') : implode(', ', $this->primaryKey);
25 25
 
26 26
         $databaseModify = new DatabaseModify($adapter, $options->getEditMode(), $table);
27 27
 
Please login to merge, or discard this patch.