Use more standardized phpcs

This commit is contained in:
Dane Everitt 2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
493 changed files with 1116 additions and 3903 deletions

View file

@ -20,18 +20,14 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
/**
* Return a subuser with the associated server relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function loadServerAndUserRelations(Subuser $subuser, bool $refresh = false): Subuser
{
if (! $subuser->relationLoaded('server') || $refresh) {
if (!$subuser->relationLoaded('server') || $refresh) {
$subuser->load('server');
}
if (! $subuser->relationLoaded('user') || $refresh) {
if (!$subuser->relationLoaded('user') || $refresh) {
$subuser->load('user');
}
@ -40,18 +36,14 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
/**
* Return a subuser with the associated permissions relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser
{
if (! $subuser->relationLoaded('permissions') || $refresh) {
if (!$subuser->relationLoaded('permissions') || $refresh) {
$subuser->load('permissions');
}
if (! $subuser->relationLoaded('user') || $refresh) {
if (!$subuser->relationLoaded('user') || $refresh) {
$subuser->load('user');
}
@ -61,10 +53,6 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
/**
* Return a subuser and associated permissions given a user_id and server_id.
*
* @param int $user
* @param int $server
* @return \Pterodactyl\Models\Subuser
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithPermissionsUsingUserAndServer(int $user, int $server): Subuser
@ -75,7 +63,7 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
])->first();
if (is_null($instance)) {
throw new RecordNotFoundException;
throw new RecordNotFoundException();
}
return $instance;