Passed
Push — master ( ecf49a...4e3a77 )
by Joao Gilberto
02:50 queued 27s
created
src/Query.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function join($table, $filter)
97 97
     {
98
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
98
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'INNER'];
99 99
         return $this;
100 100
     }
101 101
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function leftJoin($table, $filter)
111 111
     {
112
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
112
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'LEFT'];
113 113
         return $this;
114 114
     }
115 115
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function where($filter, array $params = [])
125 125
     {
126
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
126
+        $this->where[] = ['filter' => $filter, 'params' => $params];
127 127
         return $this;
128 128
     }
129 129
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             return null;
214 214
         }
215 215
         
216
-        return [ implode(' AND ', $where), $params ];
216
+        return [implode(' AND ', $where), $params];
217 217
     }
218 218
 
219 219
     /**
@@ -264,6 +264,6 @@  discard block
 block discarded – undo
264 264
 
265 265
         $sql = ORMHelper::processLiteral($sql, $params);
266 266
 
267
-        return [ 'sql' => $sql, 'params' => $params ];
267
+        return ['sql' => $sql, 'params' => $params];
268 268
     }
269 269
 }
Please login to merge, or discard this patch.
src/Updatable.php 1 patch
Spacing   +3 added lines, -3 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 where($filter, array $params = [])
62 62
     {
63
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
63
+        $this->where[] = ['filter' => $filter, 'params' => $params];
64 64
         return $this;
65 65
     }
66 66
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             return null;
88 88
         }
89 89
         
90
-        return [ implode(' AND ', $where), $params ];
90
+        return [implode(' AND ', $where), $params];
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 $instance = $item->getEntity();
136 136
                 $data = $row->toArray();
137 137
 
138
-                foreach ((array)$item->getFieldAlias() as $fieldname => $fieldalias) {
138
+                foreach ((array) $item->getFieldAlias() as $fieldname => $fieldalias) {
139 139
                     if (isset($data[$fieldalias])) {
140 140
                         $data[$fieldname] = $data[$fieldalias];
141 141
                         unset($fieldalias);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 }
144 144
                 BinderObject::bindObject($data, $instance);
145 145
 
146
-                foreach ((array)$item->getFieldMap() as $property => $fieldmap) {
146
+                foreach ((array) $item->getFieldMap() as $property => $fieldmap) {
147 147
                     $selectMask = $fieldmap[Mapper::FIELDMAP_SELECTMASK];
148 148
                     $value = isset($data[$fieldmap[Mapper::FIELDMAP_FIELD]]) ? $data[$fieldmap[Mapper::FIELDMAP_FIELD]] : "";
149 149
                     $data[$property] = $selectMask($value, $instance);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $array = BinderObject::toArrayFrom($instance, true);
169 169
 
170 170
         // Mapping the data
171
-        foreach ((array)$this->getMapper()->getFieldMap() as $property => $fieldmap) {
171
+        foreach ((array) $this->getMapper()->getFieldMap() as $property => $fieldmap) {
172 172
             $fieldname = $fieldmap[Mapper::FIELDMAP_FIELD];
173 173
             $updateMask = $fieldmap[Mapper::FIELDMAP_UPDATEMASK];
174 174
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             ->fields(array_keys($array));
191 191
 
192 192
         // Check if is insert or update
193
-        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0)  {
193
+        if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0) {
194 194
             $array[$this->mapper->getPrimaryKey()] = $this->insert($updatable, $array);
195 195
             BinderObject::bindObject($array, $instance);
196 196
         } else {
Please login to merge, or discard this patch.