diff --git a/server/src/Core/Score.php b/server/src/Core/Score.php index a0479a2..8dc8b6a 100644 --- a/server/src/Core/Score.php +++ b/server/src/Core/Score.php @@ -150,7 +150,7 @@ class Score */ public function toArray(): array { - $scoreboard = [[],[]]; + $scoreboard = [[], []]; foreach ($this->playerStats as $playerId => $playerStat) { $key = sprintf('%d-%d-%d', $playerStat->getKills(), $playerStat->getDamage(), $playerId); $scoreboard[(int)$playerStat->isAttacker()][$key] = $playerStat->toArray(); diff --git a/server/src/Enum/ItemId.php b/server/src/Enum/ItemId.php index 2c1be6e..8540854 100644 --- a/server/src/Enum/ItemId.php +++ b/server/src/Enum/ItemId.php @@ -31,7 +31,7 @@ class ItemId Equipment\Molotov::class => 35, Equipment\Smoke::class => 36, - Equipment\Bomb::class => 50, + Equipment\Bomb::class => 50, Equipment\DefuseKit::class => 51, ]; diff --git a/server/src/Event/SoundEvent.php b/server/src/Event/SoundEvent.php index c71e041..9824f02 100644 --- a/server/src/Event/SoundEvent.php +++ b/server/src/Event/SoundEvent.php @@ -61,7 +61,7 @@ final class SoundEvent extends TickEvent 'player' => $this->player?->getId(), 'surface' => $this->surface?->serialize($this->position), 'type' => $this->type->value, - 'extra' => $this->extra, + 'extra' => $this->extra, ]; } diff --git a/test/og/Shooting/KnifeAttackTest.php b/test/og/Shooting/KnifeAttackTest.php index 951e424..621c39a 100644 --- a/test/og/Shooting/KnifeAttackTest.php +++ b/test/og/Shooting/KnifeAttackTest.php @@ -5,7 +5,6 @@ namespace Test\Shooting; use cs\Core\HitBox; use cs\Core\Player; use cs\Enum\Color; -use cs\Enum\HitBoxType; use cs\Event\AttackResult; use cs\Weapon\Knife; use Test\BaseTestCase; diff --git a/test/og/Unit/BoxTest.php b/test/og/Unit/BoxTest.php index 3dacda3..3640245 100644 --- a/test/og/Unit/BoxTest.php +++ b/test/og/Unit/BoxTest.php @@ -74,7 +74,7 @@ class BoxTest extends BaseTest { $this->expectException(GameException::class); $this->expectExceptionMessage('Choose at least one box side'); - new Box(new Point(), 1,1,1, 0); + new Box(new Point(), 1, 1, 1, 0); } } diff --git a/test/og/Unit/HitBoxTest.php b/test/og/Unit/HitBoxTest.php index b1b4781..eb7cacc 100644 --- a/test/og/Unit/HitBoxTest.php +++ b/test/og/Unit/HitBoxTest.php @@ -64,7 +64,7 @@ class HitBoxTest extends BaseTest } // Just grinding code coverage... - $point = new Point2D(1,1); + $point = new Point2D(1, 1); $hit = new SphereHitBox(new Point($point->clone()->setY(-1)->addY(1)->setX(0)->x, 0), 2); $point->setFrom(new Point2D()); $this->assertTrue($hit->getRelativeCenter()->to2D('xz')->equals($point)); @@ -86,7 +86,7 @@ class HitBoxTest extends BaseTest foreach ($data as $angle => $xz) { $player->getSight()->lookHorizontal($angle); - $this->assertPositionSame(new Point($xz[0], $y, $xz[1]), $sphere->calculateWorldCoordinate($player,new Point(15, -20, 8)), " Angle: {$angle}"); + $this->assertPositionSame(new Point($xz[0], $y, $xz[1]), $sphere->calculateWorldCoordinate($player, new Point(15, -20, 8)), " Angle: {$angle}"); } } diff --git a/test/og/Unit/UtilTest.php b/test/og/Unit/UtilTest.php index 920b18c..38bebe1 100644 --- a/test/og/Unit/UtilTest.php +++ b/test/og/Unit/UtilTest.php @@ -97,6 +97,7 @@ class UtilTest extends BaseTest $this->expectException(GameException::class); $this->assertSame(123, $prop->not_exists); // @phpstan-ignore-line } + public function testGamePropertyUnknownFieldSet(): void { $prop = new GameProperty();