@@ -101,7 +101,7 @@ public function delete(Model $model): void
101101 }
102102
103103 $ this ->db ->delete ($ model ->getTableName (), $ scope );
104- foreach ((array )$ model ->getKeyName () as $ k ) {
104+ foreach ((array ) $ model ->getKeyName () as $ k ) {
105105 unset($ model ->$ k );
106106 }
107107
@@ -228,7 +228,7 @@ protected function persist(Model $model, Resolver $resolver): void
228228 // Single auto-increment key that wasn't assigned by the application
229229 $ id = $ this ->db ->lastInsertId ();
230230 if ($ id !== false ) {
231- $ model ->$ keyName = $ behaviors ->retrieveProperty ((int )$ id , $ keyName );
231+ $ model ->$ keyName = $ behaviors ->retrieveProperty ((int ) $ id , $ keyName );
232232 }
233233 }
234234
@@ -341,7 +341,7 @@ protected function keyScope(Model $model, Behaviors $behaviors): ?array
341341 {
342342 $ scope = [];
343343
344- foreach ((array )$ model ->getKeyName () as $ key ) {
344+ foreach ((array ) $ model ->getKeyName () as $ key ) {
345345 if (! $ model ->hasProperty ($ key )) {
346346 return null ;
347347 }
@@ -403,7 +403,7 @@ protected function saveLinks(BelongsToMany $relation, Model $source, array $targ
403403 foreach ($ targets as $ target ) {
404404 $ targetBehaviors = $ this ->resolverFor ($ target )->getBehaviors ($ target );
405405 $ value = $ targetBehaviors ->persistProperty ($ target ->$ targetColumn , $ targetColumn );
406- $ desired [(string )$ value ] = $ value ;
406+ $ desired [(string ) $ value ] = $ value ;
407407 }
408408
409409 if (in_array ('deleted ' , $ junction ->getColumns (), true )) {
@@ -453,7 +453,7 @@ private function fetchLinks(string $table, array $sourceColumns, string $junctio
453453 $ stored = [];
454454 foreach ($ this ->db ->select ($ select )->fetchAll (PDO ::FETCH_ASSOC ) as $ row ) {
455455 $ value = $ row [$ junctionColumn ];
456- $ stored [(string )$ value ] = $ value ;
456+ $ stored [(string ) $ value ] = $ value ;
457457 }
458458
459459 return $ stored ;
@@ -485,7 +485,7 @@ private function reconcileSoftLinks(
485485 array $ desired
486486 ): void {
487487 $ table = $ junction ->getTableName ();
488- $ changedAt = (int )($ this ->now ()->format ('U.u ' ) * 1000.0 );
488+ $ changedAt = (int ) ($ this ->now ()->format ('U.u ' ) * 1000.0 );
489489
490490 $ select = (new Select ())
491491 ->from ($ table )
@@ -494,7 +494,7 @@ private function reconcileSoftLinks(
494494
495495 $ stored = [];
496496 foreach ($ this ->db ->select ($ select )->fetchAll (PDO ::FETCH_ASSOC ) as $ row ) {
497- $ stored [(string )$ row [$ junctionColumn ]] = [
497+ $ stored [(string ) $ row [$ junctionColumn ]] = [
498498 'value ' => $ row [$ junctionColumn ],
499499 'deleted ' => $ row ['deleted ' ] === 'y ' ,
500500 ];
@@ -622,7 +622,7 @@ protected function writableColumns(Model $model): array
622622
623623 $ columns = [];
624624
625- foreach ((array )$ model ->getKeyName () as $ key ) {
625+ foreach ((array ) $ model ->getKeyName () as $ key ) {
626626 $ columns [$ key ] = $ key ;
627627 }
628628
0 commit comments