Skip to content

Commit 2280dc4

Browse files
author
Dominik süßenbach
committed
* Fix codestyle
1 parent 5fb3316 commit 2280dc4

19 files changed

+24
-34
lines changed

app/Commands/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function buildCreateAssignment(): Closure
112112
$gameModel = Game::where('name', $game->fetch())->firstOrFail();
113113
$typeModel = Type::where('name', $type->fetch())->firstOrFail();
114114

115-
$assignment = new Assignment();
115+
$assignment = new Assignment;
116116
$assignment->value = $value->fetch();
117117
$assignment->type()->associate($typeModel);
118118
$assignment->game()->associate($gameModel);

app/Exceptions/InvalidGatewayException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
use Exception;
66

7-
class InvalidGatewayException extends Exception
8-
{
9-
}
7+
class InvalidGatewayException extends Exception {}

app/GameType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212
* @property Carbon $created_at
1313
* @property Carbon $updated_at
1414
*/
15-
class GameType extends Pivot
16-
{
17-
}
15+
class GameType extends Pivot {}

app/GameUserType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@
1111
* @property Carbon $created_at
1212
* @property Carbon $updated_at
1313
*/
14-
class GameUserType extends Pivot
15-
{
16-
}
14+
class GameUserType extends Pivot {}

app/Providers/TeamspeakListenerServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ class TeamspeakListenerServiceProvider extends ServiceProvider implements Deferr
1313
{
1414
const TAG_NAME = 'teamspeak-listener';
1515

16-
public function boot(): void
17-
{
18-
}
16+
public function boot(): void {}
1917

2018
public function provides(): array
2119
{

app/Providers/TeamspeakServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
class TeamspeakServiceProvider extends ServiceProvider implements DeferrableProvider
1111
{
12-
public function boot(): void
13-
{
14-
}
12+
public function boot(): void {}
1513

1614
public function register(): void
1715
{

app/Services/GameService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function grabValues(Type $type): ?array
6666
return $values;
6767
}
6868

69-
public function setup(Type $type, array $permissions, int $sortIndex, ProgressBar $progressBar = null, string $suffix = null): bool
69+
public function setup(Type $type, array $permissions, int $sortIndex, ?ProgressBar $progressBar = null, ?string $suffix = null): bool
7070
{
7171
$values = $this->grabValues($type);
7272
if (! $values) {
@@ -113,7 +113,7 @@ public function setup(Type $type, array $permissions, int $sortIndex, ProgressBa
113113
$serverGroupId = $serverGroup->getId();
114114
}
115115

116-
$assignment = new Assignment();
116+
$assignment = new Assignment;
117117
$assignment->value = $value;
118118
$assignment->ts3_server_group_id = $serverGroupId;
119119
$assignment->type()->associate($type);

app/Services/GameServiceInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public function grabValues(Type $type): ?array;
2020
/**
2121
* Setup game
2222
*
23-
* @param Type $type Specifies the type to which the assignments should be assigned
24-
* @param array $permissions Permissions which should be assigned to newly created server groups
25-
* @param ProgressBar|null $progressBar Optional progressbar which shows the current progress
23+
* @param Type $type Specifies the type to which the assignments should be assigned
24+
* @param array $permissions Permissions which should be assigned to newly created server groups
25+
* @param ProgressBar|null $progressBar Optional progressbar which shows the current progress
2626
* @return bool Return setup result
2727
*/
28-
public function setup(Type $type, array $permissions, int $sortIndex, ProgressBar $progressBar = null, string $suffix = null): bool;
28+
public function setup(Type $type, array $permissions, int $sortIndex, ?ProgressBar $progressBar = null, ?string $suffix = null): bool;
2929
}

app/Services/Gateways/ApexLegendsGateway.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function grabPlayerData(GameUser $gameUser): ?array
7878
$stats = null;
7979

8080
$response = Http::withHeaders(['TRN-Api-Key' => $this->getApiKey()])
81-
->withMiddleware(RateLimiterMiddleware::perMinute($this->rateLimit, new ApexRateLimiterStore()))
81+
->withMiddleware(RateLimiterMiddleware::perMinute($this->rateLimit, new ApexRateLimiterStore))
8282
->retry(3, 1000, throw: false)
8383
->get('https://public-api.tracker.gg/v2/apex/standard/profile/'.$gameUser->options['platform'].'/'.$gameUser->options['name']);
8484

@@ -107,7 +107,7 @@ public function grabPlayerIdentity(array $params): ?array
107107
'platform' => $params[3],
108108
];
109109

110-
$gameUser = new GameUser();
110+
$gameUser = new GameUser;
111111
$gameUser->options = $options;
112112
if ($this->grabPlayerData($gameUser)) {
113113
return $options;

app/Services/Gateways/GameGatewayFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function create(string $gameName): GameGateway
2929

3030
if (! $gameGateway instanceof GameGateway) {
3131
Log::error('Could not create game gateway', ['game' => $gameName]);
32-
throw new InvalidGatewayException();
32+
throw new InvalidGatewayException;
3333
}
3434

3535
return $gameGateway;

app/Services/Gateways/TeamspeakGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public static function iconExists(int $id): bool
282282
return $result;
283283
}
284284

285-
public static function moveClient(int $clientId, int $channelId, string $channelPassword = null): bool
285+
public static function moveClient(int $clientId, int $channelId, ?string $channelPassword = null): bool
286286
{
287287
$result = false;
288288

database/migrations/06_create_games_entry_apex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$game = new Game();
14+
$game = new Game;
1515
$game->name = Game::GAME_NAME_APEX_LEGENDS;
1616
$game->label = 'Apex Legends';
1717
$game->saveOrFail();

database/migrations/07_create_games_entry_lol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$game = new Game();
14+
$game = new Game;
1515
$game->name = Game::GAME_NAME_LEAGUE_OF_LEGENDS;
1616
$game->label = 'League of Legends';
1717
$game->saveOrFail();

database/migrations/08_create_types_entry_rank_group.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$type = new Type();
14+
$type = new Type;
1515
$type->name = 'rank_group';
1616
$type->label = 'Rank group';
1717
$type->saveOrFail();

database/migrations/09_create_types_entry_rank_solo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$type = new Type();
14+
$type = new Type;
1515
$type->name = 'rank_solo';
1616
$type->label = 'Rank solo';
1717
$type->saveOrFail();

database/migrations/10_create_types_entry_character.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$type = new Type();
14+
$type = new Type;
1515
$type->name = 'character';
1616
$type->label = 'Character';
1717
$type->saveOrFail();

database/migrations/11_create_types_entry_position.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$type = new Type();
14+
$type = new Type;
1515
$type->name = 'position';
1616
$type->label = 'Position';
1717
$type->saveOrFail();

database/migrations/12_create_games_entry_tft.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$game = new Game();
14+
$game = new Game;
1515
$game->name = Game::GAME_NAME_TEAMFIGHT_TACTICS;
1616
$game->label = 'Teamfight Tactics';
1717
$game->saveOrFail();

database/migrations/13_create_types_entry_duo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up(): void
1111
return;
1212
}
1313

14-
$type = new Type();
14+
$type = new Type;
1515
$type->name = 'rank_duo';
1616
$type->label = 'Rank duo';
1717
$type->saveOrFail();

0 commit comments

Comments
 (0)