Passed
Push — master ( e6750d...205bf3 )
by Vince
01:47
created
src/core/user/user.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function updateAccount($properties)
156 156
     {
157
-        if( is_array($properties) ) {
157
+        if (is_array($properties)) {
158 158
             $properties = (object) $properties; //json_decode(json_encode($properties));
159 159
         }
160 160
 
161
-        if( !isset($properties->update) || 
161
+        if (!isset($properties->update) || 
162 162
             !isset($properties->where) || 
163 163
             (isset($properties->update) && !is_array($properties->update)) ||
164 164
             (isset($properties->where) && !is_array($properties->where))
@@ -185,16 +185,16 @@  discard block
 block discarded – undo
185 185
          * @var [type]
186 186
          */
187 187
         foreach ($properties->update as $u => $update) {
188
-            if( !in_array($u, $allowedFileds) ) {
188
+            if (!in_array($u, $allowedFileds)) {
189 189
                 unset($properties->update[$u]);
190
-            }else{
190
+            } else {
191 191
                 $set .= $u . ' = :' . $u . ',';
192 192
                 $binds[$u] = $update;
193 193
             }
194 194
         }
195 195
 
196 196
         $set = rtrim($set, ',');
197
-        $where =  key($properties->where) . ' = ' . $properties->where[key($properties->where)];
197
+        $where = key($properties->where) . ' = ' . $properties->where[key($properties->where)];
198 198
 
199 199
         return $this->DB()->
200 200
             query(
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $options = $this->getOptions();
241 241
         $skipValidatation = false;
242 242
 
243
-        if( isset($options['validate']) && $options['validate'] == false ) {
243
+        if (isset($options['validate']) && $options['validate'] == false) {
244 244
             $skipValidatation = true;
245 245
         }
246 246
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 break;
257 257
 
258 258
             case 'mail':
259
-                if( !filter_var($property, FILTER_VALIDATE_EMAIL) && !$skipValidatation) {
259
+                if (!filter_var($property, FILTER_VALIDATE_EMAIL) && !$skipValidatation) {
260 260
                     return false;
261 261
                 }
262 262
                 $this->mail = $property;
Please login to merge, or discard this patch.