Completed
Push — master ( debdfd...7461bf )
by Joao Gilberto
02:41
created
src/Repository.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     /**
71 71
      * @param array $id
72
-     * @return mixed|null
72
+     * @return boolean
73 73
      */
74 74
     public function delete($id)
75 75
     {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     }
83 83
 
84 84
     /**
85
-     * @param $query
85
+     * @param Query $query
86 86
      * @return bool
87 87
      */
88 88
     public function deleteByQuery($query)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 $instance = $item->getEntity();
135 135
                 BinderObject::bindObject($row->toArray(), $instance);
136 136
 
137
-                foreach ((array)$item->getFieldMap() as $property => $fieldName) {
137
+                foreach ((array) $item->getFieldMap() as $property => $fieldName) {
138 138
                     $instance->$property = $row->getField($fieldName);
139 139
                 }
140 140
                 $collection[] = $instance;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $query->table($this->mapper->getTable())
157 157
             ->fields(array_keys($array));
158 158
 
159
-        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0)  {
159
+        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0) {
160 160
             $array[$this->mapper->getPrimaryKey()] = $this->insert($query, $array);
161 161
             BinderObject::bindObject($array, $instance);
162 162
         } else {
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function join($table, $filter)
63 63
     {
64
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
64
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
65 65
         return $this;
66 66
     }
67 67
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function leftJoin($table, $filter)
77 77
     {
78
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
78
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
79 79
         return $this;
80 80
     }
81 81
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function where($filter, array $params = [])
91 91
     {
92
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
92
+        $this->where[] = ['filter' => $filter, 'params' => $params];
93 93
         return $this;
94 94
     }
95 95
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             return null;
175 175
         }
176 176
         
177
-        return [ implode(' AND ', $where), $params ];
177
+        return [implode(' AND ', $where), $params];
178 178
     }
179 179
 
180 180
     /**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $sql .= ' FOR UPDATE ';
206 206
         } 
207 207
         
208
-        return [ 'sql' => $sql, 'params' => $params ];
208
+        return ['sql' => $sql, 'params' => $params];
209 209
     }
210 210
 
211 211
     /**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             . implode(', ', $fields)
252 252
             . ' WHERE ' . $where[0];
253 253
 
254
-        return [ 'sql' => $sql, 'params' => $where[1] ];
254
+        return ['sql' => $sql, 'params' => $where[1]];
255 255
     }
256 256
 
257 257
     /**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         $sql = 'DELETE FROM ' . $this->table
269 269
             . ' WHERE ' . $where[0];
270 270
 
271
-        return [ 'sql' => $sql, 'params' => $where[1] ];
271
+        return ['sql' => $sql, 'params' => $where[1]];
272 272
     }
273 273
 
274 274
 }
Please login to merge, or discard this patch.