From 729cb4c80528171f68f2ee1f866d122b6f91c22e Mon Sep 17 00:00:00 2001 From: Dan Hemberger Date: Sat, 20 Apr 2024 11:44:31 -0700 Subject: [PATCH] Fix phpcs error from slevomat/coding-standard 8.15 > 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 --- src/pages/Admin/UniGen/SaveProcessor.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/Admin/UniGen/SaveProcessor.php b/src/pages/Admin/UniGen/SaveProcessor.php index 496a3964e..0fd924958 100644 --- a/src/pages/Admin/UniGen/SaveProcessor.php +++ b/src/pages/Admin/UniGen/SaveProcessor.php @@ -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); @@ -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); } @@ -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); } @@ -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);