@@ -57,15 +57,15 @@ public function getIdAttribute($value = null)
5757 {
5858 // If we don't have a value for 'id', we will use the Mongo '_id' value.
5959 // 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 )) {
6161 $ value = $ this ->attributes ['_id ' ];
6262 }
6363
6464 // Convert ObjectID to string.
6565 if ($ value instanceof ObjectID) {
66- return (string )$ value ;
66+ return (string ) $ value ;
6767 } elseif ($ value instanceof Binary) {
68- return (string )$ value ->getData ();
68+ return (string ) $ value ->getData ();
6969 }
7070
7171 return $ value ;
@@ -90,7 +90,7 @@ public function fromDateTime($value)
9090 }
9191
9292 // Let Eloquent convert the value to a DateTime instance.
93- if (!$ value instanceof DateTimeInterface) {
93+ if (! $ value instanceof DateTimeInterface) {
9494 $ value = parent ::asDateTime ($ value );
9595 }
9696
@@ -145,7 +145,7 @@ public function getTable()
145145 */
146146 public function getAttribute ($ key )
147147 {
148- if (!$ key ) {
148+ if (! $ key ) {
149149 return ;
150150 }
151151
@@ -157,8 +157,8 @@ public function getAttribute($key)
157157 // This checks for embedded relation support.
158158 if (
159159 method_exists ($ this , $ key )
160- && !method_exists (self ::class, $ key )
161- && !$ this ->hasAttributeGetMutator ($ key )
160+ && ! method_exists (self ::class, $ key )
161+ && ! $ this ->hasAttributeGetMutator ($ key )
162162 ) {
163163 return $ this ->getRelationValue ($ key );
164164 }
@@ -216,16 +216,16 @@ public function attributesToArray()
216216 // nicely when your models are converted to JSON.
217217 foreach ($ attributes as $ key => &$ value ) {
218218 if ($ value instanceof ObjectID) {
219- $ value = (string )$ value ;
219+ $ value = (string ) $ value ;
220220 } elseif ($ value instanceof Binary) {
221- $ value = (string )$ value ->getData ();
221+ $ value = (string ) $ value ->getData ();
222222 }
223223 }
224224
225225 // Convert dot-notation dates.
226226 foreach ($ this ->getDates () as $ key ) {
227227 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 )));
229229 }
230230 }
231231
@@ -245,7 +245,7 @@ public function getCasts()
245245 */
246246 public function originalIsEquivalent ($ key )
247247 {
248- if (!array_key_exists ($ key , $ this ->original )) {
248+ if (! array_key_exists ($ key , $ this ->original )) {
249249 return false ;
250250 }
251251
@@ -273,7 +273,7 @@ public function originalIsEquivalent($key)
273273 }
274274
275275 return is_numeric ($ attribute ) && is_numeric ($ original )
276- && strcmp ((string )$ attribute , (string )$ original ) === 0 ;
276+ && strcmp ((string ) $ attribute , (string ) $ original ) === 0 ;
277277 }
278278
279279 /**
@@ -354,7 +354,7 @@ protected function pushAttributeValues($column, array $values, $unique = false)
354354
355355 foreach ($ values as $ value ) {
356356 // 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 ))) {
358358 continue ;
359359 }
360360
@@ -396,7 +396,7 @@ protected function pullAttributeValues($column, array $values)
396396 */
397397 public function getForeignKey ()
398398 {
399- return Str::snake (class_basename ($ this )) . '_ ' . ltrim ($ this ->primaryKey , '_ ' );
399+ return Str::snake (class_basename ($ this )). '_ ' . ltrim ($ this ->primaryKey , '_ ' );
400400 }
401401
402402 /**
@@ -461,13 +461,13 @@ public function getQueueableRelations()
461461
462462 if ($ relation instanceof QueueableCollection) {
463463 foreach ($ relation ->getQueueableRelations () as $ collectionValue ) {
464- $ relations [] = $ key . '. ' . $ collectionValue ;
464+ $ relations [] = $ key. '. ' . $ collectionValue ;
465465 }
466466 }
467467
468468 if ($ relation instanceof QueueableEntity) {
469469 foreach ($ relation ->getQueueableRelations () as $ entityKey => $ entityValue ) {
470- $ relations [] = $ key . '. ' . $ entityValue ;
470+ $ relations [] = $ key. '. ' . $ entityValue ;
471471 }
472472 }
473473 }
0 commit comments