@@ -57,15 +57,15 @@ public function getIdAttribute($value = null)
57
57
{
58
58
// If we don't have a value for 'id', we will use the Mongo '_id' value.
59
59
// This allows us to work with models in a more sql-like way.
60
- if (! $ value && array_key_exists ('_id ' , $ this ->attributes )) {
60
+ if (!$ value && array_key_exists ('_id ' , $ this ->attributes )) {
61
61
$ value = $ this ->attributes ['_id ' ];
62
62
}
63
63
64
64
// Convert ObjectID to string.
65
65
if ($ value instanceof ObjectID) {
66
- return (string ) $ value ;
66
+ return (string )$ value ;
67
67
} elseif ($ value instanceof Binary) {
68
- return (string ) $ value ->getData ();
68
+ return (string )$ value ->getData ();
69
69
}
70
70
71
71
return $ value ;
@@ -90,7 +90,7 @@ public function fromDateTime($value)
90
90
}
91
91
92
92
// Let Eloquent convert the value to a DateTime instance.
93
- if (! $ value instanceof DateTimeInterface) {
93
+ if (!$ value instanceof DateTimeInterface) {
94
94
$ value = parent ::asDateTime ($ value );
95
95
}
96
96
@@ -145,7 +145,7 @@ public function getTable()
145
145
*/
146
146
public function getAttribute ($ key )
147
147
{
148
- if (! $ key ) {
148
+ if (!$ key ) {
149
149
return ;
150
150
}
151
151
@@ -216,16 +216,16 @@ public function attributesToArray()
216
216
// nicely when your models are converted to JSON.
217
217
foreach ($ attributes as $ key => &$ value ) {
218
218
if ($ value instanceof ObjectID) {
219
- $ value = (string ) $ value ;
219
+ $ value = (string )$ value ;
220
220
} elseif ($ value instanceof Binary) {
221
- $ value = (string ) $ value ->getData ();
221
+ $ value = (string )$ value ->getData ();
222
222
}
223
223
}
224
224
225
225
// Convert dot-notation dates.
226
226
foreach ($ this ->getDates () as $ key ) {
227
227
if (Str::contains ($ key , '. ' ) && Arr::has ($ attributes , $ key )) {
228
- Arr::set ($ attributes , $ key , (string ) $ this ->asDateTime (Arr::get ($ attributes , $ key )));
228
+ Arr::set ($ attributes , $ key , (string )$ this ->asDateTime (Arr::get ($ attributes , $ key )));
229
229
}
230
230
}
231
231
@@ -245,7 +245,7 @@ public function getCasts()
245
245
*/
246
246
public function originalIsEquivalent ($ key )
247
247
{
248
- if (! array_key_exists ($ key , $ this ->original )) {
248
+ if (!array_key_exists ($ key , $ this ->original )) {
249
249
return false ;
250
250
}
251
251
@@ -273,7 +273,7 @@ public function originalIsEquivalent($key)
273
273
}
274
274
275
275
return is_numeric ($ attribute ) && is_numeric ($ original )
276
- && strcmp ((string ) $ attribute , (string ) $ original ) === 0 ;
276
+ && strcmp ((string )$ attribute , (string )$ original ) === 0 ;
277
277
}
278
278
279
279
/**
@@ -354,7 +354,7 @@ protected function pushAttributeValues($column, array $values, $unique = false)
354
354
355
355
foreach ($ values as $ value ) {
356
356
// Don't add duplicate values when we only want unique values.
357
- if ($ unique && (! is_array ($ current ) || in_array ($ value , $ current ))) {
357
+ if ($ unique && (!is_array ($ current ) || in_array ($ value , $ current ))) {
358
358
continue ;
359
359
}
360
360
@@ -396,7 +396,7 @@ protected function pullAttributeValues($column, array $values)
396
396
*/
397
397
public function getForeignKey ()
398
398
{
399
- return Str::snake (class_basename ($ this )). '_ ' . ltrim ($ this ->primaryKey , '_ ' );
399
+ return Str::snake (class_basename ($ this )) . '_ ' . ltrim ($ this ->primaryKey , '_ ' );
400
400
}
401
401
402
402
/**
@@ -461,13 +461,13 @@ public function getQueueableRelations()
461
461
462
462
if ($ relation instanceof QueueableCollection) {
463
463
foreach ($ relation ->getQueueableRelations () as $ collectionValue ) {
464
- $ relations [] = $ key. '. ' . $ collectionValue ;
464
+ $ relations [] = $ key . '. ' . $ collectionValue ;
465
465
}
466
466
}
467
467
468
468
if ($ relation instanceof QueueableEntity) {
469
469
foreach ($ relation ->getQueueableRelations () as $ entityKey => $ entityValue ) {
470
- $ relations [] = $ key. '. ' . $ entityValue ;
470
+ $ relations [] = $ key . '. ' . $ entityValue ;
471
471
}
472
472
}
473
473
}
0 commit comments