Skip to content

Commit

Permalink
Fix phpcs error from slevomat/coding-standard 8.15
Browse files Browse the repository at this point in the history
> Multi-line function calls must have a trailing comma after the last parameter.
> (SlevomatCodingStandard.Functions.RequireTrailingCommaInCall.MissingTrailingComma)

This error appeared due to a bugfix with this sniff in arrow functions
in v8.15.

https://github.com/slevomat/coding-standard/releases/tag/8.15.0
  • Loading branch information
hemberger committed Apr 20, 2024
1 parent f047b5e commit 729cb4c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/Admin/UniGen/SaveProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function build(Account $account): never {
//4 per sector max locs and no locations inside fed
$randSector = findValidSector(
$galSectors,
fn(Sector $sector): bool => checkSectorAllowedForLoc($sector, $location)
fn(Sector $sector): bool => checkSectorAllowedForLoc($sector, $location),
);
$randSector->addLocation($location);
$randSector->addLinkedLocations($location);
Expand Down Expand Up @@ -107,13 +107,13 @@ public function build(Account $account): never {
//only 1 warp per sector
$galSector = findValidSector(
$galSectors,
fn(Sector $sector): bool => !$sector->hasWarp() && !$sector->offersFederalProtection()
fn(Sector $sector): bool => !$sector->hasWarp() && !$sector->offersFederalProtection(),
);
//get other side
//make sure it does not go to itself
$otherSector = findValidSector(
$eachGalaxy->getSectors(),
fn(Sector $sector): bool => !$sector->hasWarp() && !$sector->offersFederalProtection() && !$sector->equals($galSector)
fn(Sector $sector): bool => !$sector->hasWarp() && !$sector->offersFederalProtection() && !$sector->equals($galSector),
);
$galSector->setWarp($otherSector);
}
Expand All @@ -136,7 +136,7 @@ public function build(Account $account): never {
for ($i = 1; $i <= $numberOfPlanets; $i++) {
$galSector = findValidSector(
$galSectors,
fn(Sector $sector): bool => !$sector->hasPlanet() // 1 per sector
fn(Sector $sector): bool => !$sector->hasPlanet(), // 1 per sector
);
$galSector->createPlanet($planetTypeID);
}
Expand Down Expand Up @@ -181,7 +181,7 @@ public function build(Account $account): never {
//get a sector for this port
$galSector = findValidSector(
$galSectors,
fn(Sector $sector): bool => !$sector->hasPort() && !$sector->offersFederalProtection()
fn(Sector $sector): bool => !$sector->hasPort() && !$sector->offersFederalProtection(),
);

$raceID = array_rand($numRacePorts);
Expand Down

0 comments on commit 729cb4c

Please sign in to comment.