GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (9c3470)
by O2System
04:07
created
src/Models/NoSql/Traits/ModifierTrait.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 
82 82
         if (empty($where)) {
83 83
             if (empty($this->primaryKeys)) {
84
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
84
+                $where[$primaryKey] = $sets[$primaryKey];
85 85
             } else {
86 86
                 foreach ($this->primaryKeys as $primaryKey) {
87
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
87
+                    $where[$primaryKey] = $sets[$primaryKey];
88 88
                 }
89 89
             }
90 90
         }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $collection = isset($collection) ? $collection : $this->collection;
119 119
 
120 120
         if (method_exists($this, 'insertRecordSets')) {
121
-            foreach($sets as $set) {
121
+            foreach ($sets as $set) {
122 122
                 $this->insertRecordSets($set);
123 123
             }
124 124
         }
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 
148 148
         $where = [];
149 149
         if (empty($this->primaryKeys)) {
150
-            $where[ $primaryKey ] = $sets[ $primaryKey ];
151
-            $this->qb->where($primaryKey, $sets[ $primaryKey ]);
150
+            $where[$primaryKey] = $sets[$primaryKey];
151
+            $this->qb->where($primaryKey, $sets[$primaryKey]);
152 152
         } else {
153 153
             foreach ($this->primaryKeys as $primaryKey) {
154
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
154
+                $where[$primaryKey] = $sets[$primaryKey];
155 155
             }
156 156
         }
157 157
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $this->primaryKeys = [];
161 161
 
162 162
         if (method_exists($this, 'updateRecordSets')) {
163
-            foreach($sets as $set) {
163
+            foreach ($sets as $set) {
164 164
                 $this->updateRecordSets($set);
165 165
             }
166 166
         }
@@ -199,19 +199,19 @@  discard block
 block discarded – undo
199 199
         $where = [];
200 200
 
201 201
         if (empty($this->primaryKeys)) {
202
-            $where[ $primaryKey ] = $id;
203
-            $sets[ $primaryKey ] = $id;
202
+            $where[$primaryKey] = $id;
203
+            $sets[$primaryKey] = $id;
204 204
         } elseif (is_array($id)) {
205 205
             foreach ($this->primaryKeys as $primaryKey) {
206
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
207
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
206
+                $where[$primaryKey] = $sets[$primaryKey];
207
+                $sets[$primaryKey] = $id[$primaryKey];
208 208
             }
209 209
         } else {
210 210
             foreach ($this->primaryKeys as $primaryKey) {
211
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
211
+                $where[$primaryKey] = $sets[$primaryKey];
212 212
             }
213 213
 
214
-            $sets[ reset($this->primaryKeys) ] = $id;
214
+            $sets[reset($this->primaryKeys)] = $id;
215 215
         }
216 216
 
217 217
         // Reset Primary Keys
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $affectedRows = [];
262 262
 
263 263
         foreach ($ids as $id) {
264
-            $affectedRows[ $id ] = $this->trash($id);
264
+            $affectedRows[$id] = $this->trash($id);
265 265
         }
266 266
 
267 267
         return $affectedRows;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $affectedRows = [];
275 275
 
276 276
         foreach ($ids as $id) {
277
-            $affectedRows[ $id ] = $this->trashBy($id, $where, $collection);
277
+            $affectedRows[$id] = $this->trashBy($id, $where, $collection);
278 278
         }
279 279
 
280 280
         return $affectedRows;
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
 
293 293
         $where = [];
294 294
         if (empty($this->primaryKeys)) {
295
-            $where[ $primaryKey ] = $id;
295
+            $where[$primaryKey] = $id;
296 296
         } elseif (is_array($id)) {
297 297
             foreach ($this->primaryKeys as $primaryKey) {
298
-                $where[ $primaryKey ] = $id[ $primaryKey ];
298
+                $where[$primaryKey] = $id[$primaryKey];
299 299
             }
300 300
         } else {
301
-            $where[ reset($this->primaryKeys) ] = $id;
301
+            $where[reset($this->primaryKeys)] = $id;
302 302
         }
303 303
 
304 304
         // Reset Primary Keys
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $affectedRows = [];
337 337
 
338 338
         foreach ($ids as $id) {
339
-            $affectedRows[ $id ] = $this->delete($id, $force, $collection);
339
+            $affectedRows[$id] = $this->delete($id, $force, $collection);
340 340
         }
341 341
 
342 342
         return $affectedRows;
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $affectedRows = [];
348 348
 
349 349
         foreach ($ids as $id) {
350
-            $affectedRows[ $id ] = $this->deleteBy($id, $where, $force, $collection);
350
+            $affectedRows[$id] = $this->deleteBy($id, $where, $force, $collection);
351 351
         }
352 352
 
353 353
         return $affectedRows;
@@ -364,19 +364,19 @@  discard block
 block discarded – undo
364 364
         $where = [];
365 365
 
366 366
         if (empty($this->primaryKeys)) {
367
-            $where[ $primaryKey ] = $id;
368
-            $sets[ $primaryKey ] = $id;
367
+            $where[$primaryKey] = $id;
368
+            $sets[$primaryKey] = $id;
369 369
         } elseif (is_array($id)) {
370 370
             foreach ($this->primaryKeys as $primaryKey) {
371
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
372
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
371
+                $where[$primaryKey] = $sets[$primaryKey];
372
+                $sets[$primaryKey] = $id[$primaryKey];
373 373
             }
374 374
         } else {
375 375
             foreach ($this->primaryKeys as $primaryKey) {
376
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
376
+                $where[$primaryKey] = $sets[$primaryKey];
377 377
             }
378 378
 
379
-            $sets[ reset($this->primaryKeys) ] = $id;
379
+            $sets[reset($this->primaryKeys)] = $id;
380 380
         }
381 381
 
382 382
         // Reset Primary Keys
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         $affectedRows = [];
420 420
 
421 421
         foreach ($ids as $id) {
422
-            $affectedRows[ $id ] = $this->publish($id, $collection);
422
+            $affectedRows[$id] = $this->publish($id, $collection);
423 423
         }
424 424
 
425 425
         return $affectedRows;
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
         $affectedRows = [];
433 433
 
434 434
         foreach ($ids as $id) {
435
-            $affectedRows[ $id ] = $this->publishBy($id, $where, $collection);
435
+            $affectedRows[$id] = $this->publishBy($id, $where, $collection);
436 436
         }
437 437
 
438 438
         return $affectedRows;
Please login to merge, or discard this patch.
src/Models/NoSql/Model.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             loader()->addNamespace($reflection->name, $subModelPath);
157 157
 
158 158
             foreach (glob($subModelPath . '*.php') as $filepath) {
159
-                $this->validSubModels[ strtolower(pathinfo($filepath, PATHINFO_FILENAME)) ] = $filepath;
159
+                $this->validSubModels[strtolower(pathinfo($filepath, PATHINFO_FILENAME))] = $filepath;
160 160
             }
161 161
         }
162 162
     }
@@ -183,24 +183,24 @@  discard block
 block discarded – undo
183 183
 
184 184
     public function &__get($property)
185 185
     {
186
-        $get[ $property ] = false;
186
+        $get[$property] = false;
187 187
 
188 188
         if (o2system()->hasService($property)) {
189
-            $get[ $property ] = o2system()->getService($property);
189
+            $get[$property] = o2system()->getService($property);
190 190
         } elseif (array_key_exists($property, $this->validSubModels)) {
191
-            $get[ $property ] = $this->loadSubModel($property);
191
+            $get[$property] = $this->loadSubModel($property);
192 192
         } elseif (o2system()->__isset($property)) {
193
-            $get[ $property ] = o2system()->__get($property);
193
+            $get[$property] = o2system()->__get($property);
194 194
         }
195 195
 
196
-        return $get[ $property ];
196
+        return $get[$property];
197 197
     }
198 198
 
199 199
     // ------------------------------------------------------------------------
200 200
 
201 201
     final protected function loadSubModel($model)
202 202
     {
203
-        if (is_file($this->validSubModels[ $model ])) {
203
+        if (is_file($this->validSubModels[$model])) {
204 204
             $className = '\\' . get_called_class() . '\\' . ucfirst($model);
205 205
             $className = str_replace('\Base\\Model', '\Models', $className);
206 206
 
Please login to merge, or discard this patch.
src/Models/Sql/Traits/HierarchicalTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                         ]);
87 87
                 }
88 88
 
89
-                $update[ 'id' ] = $row->id;
89
+                $update['id'] = $row->id;
90 90
 
91 91
                 if ($this->hasChilds($row->id)) {
92 92
                     $right = $this->rebuildTree($row->id, $right, $depth + 1);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                         ->update($update = [
97 97
                             'record_right' => $right,
98 98
                         ]);
99
-                    $update[ 'id' ] = $row->id;
99
+                    $update['id'] = $row->id;
100 100
                 }
101 101
 
102 102
                 $i++;
Please login to merge, or discard this patch.
src/Models/Sql/Traits/RecordTrait.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -77,58 +77,58 @@
 block discarded – undo
77 77
     {
78 78
         $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s');
79 79
 
80
-        if ( ! isset($sets[ 'record_status' ])) {
81
-            $sets[ 'record_status' ] = $this->recordStatus;
80
+        if ( ! isset($sets['record_status'])) {
81
+            $sets['record_status'] = $this->recordStatus;
82 82
         }
83 83
 
84 84
         if (empty($this->primaryKeys)) {
85 85
             $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';
86 86
 
87
-            if (empty($sets[ $primaryKey ])) {
88
-                if ( ! isset($sets[ 'record_create_user' ])) {
89
-                    $sets[ 'record_create_user' ] = $this->recordUser;
87
+            if (empty($sets[$primaryKey])) {
88
+                if ( ! isset($sets['record_create_user'])) {
89
+                    $sets['record_create_user'] = $this->recordUser;
90 90
                 }
91 91
 
92
-                if ( ! isset($sets[ 'record_create_timestamp' ])) {
93
-                    $sets[ 'record_create_timestamp' ] = $timestamp;
92
+                if ( ! isset($sets['record_create_timestamp'])) {
93
+                    $sets['record_create_timestamp'] = $timestamp;
94 94
                 } elseif ($this->unixTimestamp) {
95
-                    $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]);
95
+                    $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']);
96 96
                 }
97 97
             }
98 98
         } else {
99 99
             foreach ($this->primaryKeys as $primaryKey) {
100
-                if (empty($sets[ $primaryKey ])) {
101
-                    if ( ! isset($sets[ 'record_create_user' ])) {
102
-                        $sets[ 'record_create_user' ] = $this->recordUser;
100
+                if (empty($sets[$primaryKey])) {
101
+                    if ( ! isset($sets['record_create_user'])) {
102
+                        $sets['record_create_user'] = $this->recordUser;
103 103
                     }
104 104
 
105
-                    if ( ! isset($sets[ 'record_create_timestamp' ])) {
106
-                        $sets[ 'record_create_timestamp' ] = $timestamp;
105
+                    if ( ! isset($sets['record_create_timestamp'])) {
106
+                        $sets['record_create_timestamp'] = $timestamp;
107 107
                     } elseif ($this->unixTimestamp) {
108
-                        $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]);
108
+                        $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']);
109 109
                     }
110 110
                 }
111 111
             }
112 112
         }
113 113
 
114
-        $sets[ 'record_update_user' ] = $this->recordUser;
114
+        $sets['record_update_user'] = $this->recordUser;
115 115
 
116
-        if ( ! isset($sets[ 'record_update_timestamp' ])) {
117
-            $sets[ 'record_update_timestamp' ] = $timestamp;
116
+        if ( ! isset($sets['record_update_timestamp'])) {
117
+            $sets['record_update_timestamp'] = $timestamp;
118 118
         } elseif ($this->unixTimestamp) {
119
-            $sets[ 'record_update_timestamp' ] = strtotime($sets[ 'record_update_timestamp' ]);
119
+            $sets['record_update_timestamp'] = strtotime($sets['record_update_timestamp']);
120 120
         }
121 121
     }
122 122
 
123 123
     protected function updateRecordSets(array &$sets)
124 124
     {
125
-        $sets[ 'record_status' ] = $this->recordStatus;
126
-        $sets[ 'record_update_user' ] = $this->recordUser;
125
+        $sets['record_status'] = $this->recordStatus;
126
+        $sets['record_update_user'] = $this->recordUser;
127 127
 
128 128
         $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s');
129 129
 
130
-        if ( ! isset($sets[ 'record_update_timestamp' ])) {
131
-            $sets[ 'record_update_timestamp' ] = $timestamp;
130
+        if ( ! isset($sets['record_update_timestamp'])) {
131
+            $sets['record_update_timestamp'] = $timestamp;
132 132
         }
133 133
     }
134 134
 
Please login to merge, or discard this patch.
src/Models/Sql/Traits/ModifierTrait.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
         }
47 47
 
48 48
         if (method_exists($this, 'getRecordOrdering')) {
49
-            if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
50
-                $sets[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
49
+            if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
50
+                $sets['record_ordering'] = $this->getRecordOrdering($this->table);
51 51
             }
52 52
         }
53 53
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function insertOrUpdate(array $sets)
68 68
     {
69 69
         // Try to find
70
-        if($result = $this->qb->from($this->table)->getWhere($sets)) {
70
+        if ($result = $this->qb->from($this->table)->getWhere($sets)) {
71 71
             return $this->update($sets);
72 72
         } else {
73 73
             return $this->insert($sets);
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
             foreach ($sets as $set) {
83 83
                 $this->insertRecordSets($set);
84 84
 
85
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
86
-                    $set[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
85
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
86
+                    $set['record_ordering'] = $this->getRecordOrdering($this->table);
87 87
                 }
88 88
             }
89 89
         }
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
         if (empty($where)) {
123 123
             if (empty($this->primaryKeys)) {
124
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
124
+                $where[$primaryKey] = $sets[$primaryKey];
125 125
             } else {
126 126
                 foreach ($this->primaryKeys as $primaryKey) {
127
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
127
+                    $where[$primaryKey] = $sets[$primaryKey];
128 128
                 }
129 129
             }
130 130
         }
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         if (method_exists($this, 'getRecordOrdering')) {
145
-            if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
146
-                $sets[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
145
+            if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
146
+                $sets['record_ordering'] = $this->getRecordOrdering($this->table);
147 147
             }
148 148
         }
149 149
 
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
 
196 196
         if (empty($where)) {
197 197
             if (empty($this->primaryKeys)) {
198
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
198
+                $where[$primaryKey] = $sets[$primaryKey];
199 199
             } else {
200 200
                 foreach ($this->primaryKeys as $primaryKey) {
201
-                    $where[ $primaryKey ] = $sets[ $primaryKey ];
201
+                    $where[$primaryKey] = $sets[$primaryKey];
202 202
                 }
203 203
             }
204 204
         }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $this->primaryKeys = [];
209 209
 
210 210
         // Try to find
211
-        if($result = $this->qb->from($this->table)->getWhere($where)) {
211
+        if ($result = $this->qb->from($this->table)->getWhere($where)) {
212 212
             return $this->update($sets, $where);
213 213
         } else {
214 214
             return $this->insert($sets);
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 
226 226
         $where = [];
227 227
         if (empty($this->primaryKeys)) {
228
-            $where[ $primaryKey ] = $sets[ $primaryKey ];
229
-            $this->qb->where($primaryKey, $sets[ $primaryKey ]);
228
+            $where[$primaryKey] = $sets[$primaryKey];
229
+            $this->qb->where($primaryKey, $sets[$primaryKey]);
230 230
         } else {
231 231
             foreach ($this->primaryKeys as $primaryKey) {
232
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
232
+                $where[$primaryKey] = $sets[$primaryKey];
233 233
             }
234 234
         }
235 235
 
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
             foreach ($sets as $set) {
242 242
                 $this->updateRecordSets($set);
243 243
 
244
-                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
245
-                    $set[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
244
+                if ($this->recordOrdering === true && empty($sets['record_ordering'])) {
245
+                    $set['record_ordering'] = $this->getRecordOrdering($this->table);
246 246
                 }
247 247
             }
248 248
         }
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
         $where = [];
280 280
 
281 281
         if (empty($this->primaryKeys)) {
282
-            $where[ $primaryKey ] = $id;
283
-            $sets[ $primaryKey ] = $id;
282
+            $where[$primaryKey] = $id;
283
+            $sets[$primaryKey] = $id;
284 284
         } elseif (is_array($id)) {
285 285
             foreach ($this->primaryKeys as $primaryKey) {
286
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
287
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
286
+                $where[$primaryKey] = $sets[$primaryKey];
287
+                $sets[$primaryKey] = $id[$primaryKey];
288 288
             }
289 289
         } else {
290 290
             foreach ($this->primaryKeys as $primaryKey) {
291
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
291
+                $where[$primaryKey] = $sets[$primaryKey];
292 292
             }
293 293
 
294
-            $sets[ reset($this->primaryKeys) ] = $id;
294
+            $sets[reset($this->primaryKeys)] = $id;
295 295
         }
296 296
 
297 297
         // Reset Primary Keys
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         $affectedRows = [];
342 342
 
343 343
         foreach ($ids as $id) {
344
-            $affectedRows[ $id ] = $this->trash($id);
344
+            $affectedRows[$id] = $this->trash($id);
345 345
         }
346 346
 
347 347
         return $affectedRows;
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         $affectedRows = [];
355 355
 
356 356
         foreach ($ids as $id) {
357
-            $affectedRows[ $id ] = $this->trashBy($id, $where);
357
+            $affectedRows[$id] = $this->trashBy($id, $where);
358 358
         }
359 359
 
360 360
         return $affectedRows;
@@ -368,13 +368,13 @@  discard block
 block discarded – undo
368 368
 
369 369
         $where = [];
370 370
         if (empty($this->primaryKeys)) {
371
-            $where[ $primaryKey ] = $id;
371
+            $where[$primaryKey] = $id;
372 372
         } elseif (is_array($id)) {
373 373
             foreach ($this->primaryKeys as $primaryKey) {
374
-                $where[ $primaryKey ] = $id[ $primaryKey ];
374
+                $where[$primaryKey] = $id[$primaryKey];
375 375
             }
376 376
         } else {
377
-            $where[ reset($this->primaryKeys) ] = $id;
377
+            $where[reset($this->primaryKeys)] = $id;
378 378
         }
379 379
 
380 380
         // Reset Primary Keys
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         $affectedRows = [];
413 413
 
414 414
         foreach ($ids as $id) {
415
-            $affectedRows[ $id ] = $this->delete($id, $force);
415
+            $affectedRows[$id] = $this->delete($id, $force);
416 416
         }
417 417
 
418 418
         return $affectedRows;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $affectedRows = [];
424 424
 
425 425
         foreach ($ids as $id) {
426
-            $affectedRows[ $id ] = $this->deleteBy($id, $where, $force);
426
+            $affectedRows[$id] = $this->deleteBy($id, $where, $force);
427 427
         }
428 428
 
429 429
         return $affectedRows;
@@ -439,19 +439,19 @@  discard block
 block discarded – undo
439 439
         $where = [];
440 440
 
441 441
         if (empty($this->primaryKeys)) {
442
-            $where[ $primaryKey ] = $id;
443
-            $sets[ $primaryKey ] = $id;
442
+            $where[$primaryKey] = $id;
443
+            $sets[$primaryKey] = $id;
444 444
         } elseif (is_array($id)) {
445 445
             foreach ($this->primaryKeys as $primaryKey) {
446
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
447
-                $sets[ $primaryKey ] = $id[ $primaryKey ];
446
+                $where[$primaryKey] = $sets[$primaryKey];
447
+                $sets[$primaryKey] = $id[$primaryKey];
448 448
             }
449 449
         } else {
450 450
             foreach ($this->primaryKeys as $primaryKey) {
451
-                $where[ $primaryKey ] = $sets[ $primaryKey ];
451
+                $where[$primaryKey] = $sets[$primaryKey];
452 452
             }
453 453
 
454
-            $sets[ reset($this->primaryKeys) ] = $id;
454
+            $sets[reset($this->primaryKeys)] = $id;
455 455
         }
456 456
 
457 457
         // Reset Primary Keys
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         $affectedRows = [];
495 495
 
496 496
         foreach ($ids as $id) {
497
-            $affectedRows[ $id ] = $this->publish($id);
497
+            $affectedRows[$id] = $this->publish($id);
498 498
         }
499 499
 
500 500
         return $affectedRows;
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
         $affectedRows = [];
508 508
 
509 509
         foreach ($ids as $id) {
510
-            $affectedRows[ $id ] = $this->publishBy($id, $where);
510
+            $affectedRows[$id] = $this->publishBy($id, $where);
511 511
         }
512 512
 
513 513
         return $affectedRows;
Please login to merge, or discard this patch.
src/Models/Sql/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 if ($filepath === $filePath) {
162 162
                     continue;
163 163
                 }
164
-                $this->validSubModels[ camelcase(pathinfo($filepath, PATHINFO_FILENAME)) ] = $filepath;
164
+                $this->validSubModels[camelcase(pathinfo($filepath, PATHINFO_FILENAME))] = $filepath;
165 165
             }
166 166
         }
167 167
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             }
208 208
         }
209 209
 
210
-        if (empty($get[ $property ])) {
210
+        if (empty($get[$property])) {
211 211
             if (o2system()->hasService($property)) {
212 212
                 return o2system()->getService($property);
213 213
             } elseif ($this->hasSubModel($property)) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     final public function hasSubModel($model)
249 249
     {
250 250
         if (array_key_exists($model, $this->validSubModels)) {
251
-            return (bool)is_file($this->validSubModels[ $model ]);
251
+            return (bool)is_file($this->validSubModels[$model]);
252 252
         }
253 253
 
254 254
         return false;
Please login to merge, or discard this patch.
src/Models/Sql/Relations/Maps/Reference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $referenceModel,
31 31
         $foreignKey = null
32 32
     ) {
33
-        $this->currentModel =& $currentModel;
33
+        $this->currentModel = & $currentModel;
34 34
         $this->currentTable = $currentModel->table;
35 35
         $this->currentPrimaryKey = $currentModel->primaryKey;
36 36
 
Please login to merge, or discard this patch.
src/Models/Sql/Relations/Maps/Inverse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $referenceModel,
31 31
         $foreignKey = null
32 32
     ) {
33
-        $this->currentModel =& $currentModel;
33
+        $this->currentModel = & $currentModel;
34 34
         $this->currentTable = $currentModel->table;
35 35
         $this->currentPrimaryKey = $currentModel->primaryKey;
36 36
 
Please login to merge, or discard this patch.
src/Models/Sql/Relations/Maps/Intermediary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $intermediaryReferenceForeignKey = null
41 41
     ) {
42 42
 
43
-        $this->currentModel =& $currentModel;
43
+        $this->currentModel = & $currentModel;
44 44
         $this->currentTable = $currentModel->table;
45 45
         $this->currentPrimaryKey = $currentModel->primaryKey;
46 46
 
Please login to merge, or discard this patch.