Passed
Push — master ( 36e64a...0adb6c )
by Richard
01:36
created
maphper/datasource/database.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 		$this->crudBuilder = new \Maphper\Lib\CrudBuilder();
28 28
 		$this->selectBuilder = new \Maphper\Lib\SelectBuilder();
29 29
 
30
-		$this->fields = implode(',', array_map([$this->adapter, 'quote'], (array) $this->options->read('fields')));
30
+		$this->fields = implode(',', array_map([$this->adapter, 'quote'], (array)$this->options->read('fields')));
31 31
 
32
-		$this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort')  : implode(', ', $this->primaryKey);
32
+		$this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort') : implode(', ', $this->primaryKey);
33 33
 
34 34
 		$this->alterDb = $this->options->getEditMode();
35 35
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
     private function optimizeColumns() {
40
-        if (self::EDIT_OPTIMISE & $this->alterDb && rand(0,500) == 1) $this->adapter->optimiseColumns($this->table);
40
+        if (self::EDIT_OPTIMISE & $this->alterDb && rand(0, 500) == 1) $this->adapter->optimiseColumns($this->table);
41 41
     }
42 42
 
43 43
 	public function getPrimaryKey() {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     private function updateCache($data) {
183 183
         $pkValue = $data->{$this->primaryKey[0]};
184
-		if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object) array_merge((array)$this->cache[$pkValue], (array)$data);
184
+		if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object)array_merge((array)$this->cache[$pkValue], (array)$data);
185 185
 		else $this->cache[$pkValue] = $data;
186 186
     }
187 187
 
Please login to merge, or discard this patch.