Skip to content

Commit e59a8e5

Browse files
committed
fix syleci
1 parent 978fe2b commit e59a8e5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/HybridRelationsTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ public function testHybridWith()
193193
$this->assertEquals($user->id, $user->books->count());
194194
});
195195
}
196+
196197
public function testHybridSync()
197198
{
198199
$user = new MysqlUser;
@@ -226,15 +227,15 @@ public function testHybridSync()
226227
$this->assertEquals(2, $client->usersMysql->count());
227228

228229
// sync 2 Clients
229-
$user->clients()->sync([$client->_id,$otherClient->_id ]);
230+
$user->clients()->sync([$client->_id, $otherClient->_id ]);
230231
$user = MysqlUser::find($user->id);
231232
$this->assertEquals(2, $user->clients->count());
232233
// Sync 1 Client
233234
$user->clients()->sync([$client->_id]);
234235
$user = MysqlUser::find($user->id);
235236
$this->assertEquals(1, $user->clients->count());
236237
// Sync 2 Clients again
237-
$user->clients()->sync([$client->_id,$otherClient->_id ]);
238+
$user->clients()->sync([$client->_id, $otherClient->_id ]);
238239
$user = MysqlUser::find($user->id);
239240
$this->assertEquals(2, $user->clients->count());
240241
}

tests/models/MysqlUser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function mysqlBooks(): HasMany
3333

3434
public function clients()
3535
{
36-
return $this->belongsToMany('Client',null,'mysql_users_id','clients');
36+
return $this->belongsToMany('Client', null, 'mysql_users_id', 'clients');
3737
}
3838

3939
/**
@@ -55,7 +55,7 @@ public static function executeSchema(): void
5555
Schema::connection('mysql')->create('client_mysql_user', function (Blueprint $table) {
5656
$table->integer('mysql_user_id')->unsigned();
5757
$table->string('client_id');
58-
$table->primary(['mysql_user_id','client_id']);
58+
$table->primary(['mysql_user_id', 'client_id']);
5959
});
6060
}
6161
}

0 commit comments

Comments
 (0)