Completed
Push — master ( 4deaab...ecf49a )
by Joao
04:00 queued 01:34
created
src/Mapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 
134 134
     public static function defaultClosure()
135 135
     {
136
-        return function ($value, $instance) {
136
+        return function($value, $instance) {
137 137
             return $value;
138 138
         };
139 139
     }
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 $data = $row->toArray();
173 173
 
174 174
                 BinderObject::bindObject($data, $instance);
175
-                foreach ((array)$item->getFieldMap() as $property => $fieldmap) {
175
+                foreach ((array) $item->getFieldMap() as $property => $fieldmap) {
176 176
                     $selectMask = $fieldmap[Mapper::FIELDMAP_SELECTMASK];
177 177
                     $data[$property] = $selectMask($row->get($fieldmap[Mapper::FIELDMAP_FIELD]), $instance);
178 178
                 }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $array = BinderObject::toArrayFrom($instance, true);
199 199
 
200 200
         // Mapping the data
201
-        foreach ((array)$this->getMapper()->getFieldMap() as $property => $fieldmap) {
201
+        foreach ((array) $this->getMapper()->getFieldMap() as $property => $fieldmap) {
202 202
             $fieldname = $fieldmap[Mapper::FIELDMAP_FIELD];
203 203
             $updateMask = $fieldmap[Mapper::FIELDMAP_UPDATEMASK];
204 204
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             ->fields(array_keys($array));
221 221
 
222 222
         // Check if is insert or update
223
-        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0)  {
223
+        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0) {
224 224
             $array[$this->mapper->getPrimaryKey()] = $this->insert($query, $array);
225 225
             BinderObject::bindObject($array, $instance);
226 226
         } else {
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function fields(array $fields)
33 33
     {
34
-        $this->fields = array_merge($this->fields, (array)$fields);
34
+        $this->fields = array_merge($this->fields, (array) $fields);
35 35
         
36 36
         return $this;
37 37
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function join($table, $filter)
62 62
     {
63
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
63
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
64 64
         return $this;
65 65
     }
66 66
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function leftJoin($table, $filter)
76 76
     {
77
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
77
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
78 78
         return $this;
79 79
     }
80 80
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function where($filter, array $params = [])
90 90
     {
91
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
91
+        $this->where[] = ['filter' => $filter, 'params' => $params];
92 92
         return $this;
93 93
     }
94 94
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return null;
160 160
         }
161 161
         
162
-        return [ implode(' AND ', $where), $params ];
162
+        return [implode(' AND ', $where), $params];
163 163
     }
164 164
 
165 165
     /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             $sql .= ' FOR UPDATE ';
191 191
         }
192 192
 
193
-        return [ 'sql' => $sql, 'params' => $params ];
193
+        return ['sql' => $sql, 'params' => $params];
194 194
     }
195 195
 
196 196
     /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             . implode(', ', $fields)
258 258
             . ' WHERE ' . $where[0];
259 259
 
260
-        return [ 'sql' => $sql, 'params' => $where[1] ];
260
+        return ['sql' => $sql, 'params' => $where[1]];
261 261
     }
262 262
 
263 263
     /**
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $sql = 'DELETE FROM ' . $this->table
275 275
             . ' WHERE ' . $where[0];
276 276
 
277
-        return [ 'sql' => $sql, 'params' => $where[1] ];
277
+        return ['sql' => $sql, 'params' => $where[1]];
278 278
     }
279 279
 
280 280
 }
Please login to merge, or discard this patch.