Skip to content

Commit 36fd944

Browse files
committed
style: clean up code style
1 parent ce057eb commit 36fd944

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/ProgramScraper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ public function __construct(private readonly ScraperInterface $scraper)
3535
public function scrape(CarbonInterface|string $date = 'today'): array
3636
{
3737
$date = Carbon::parse($date, 'Asia/Tokyo');
38+
3839
/** @psalm-var ScrapedStadiumRaces $programs */
3940
$programs = $this->scraper->scrapePrograms($date);
41+
4042
return $this->normalize($programs);
4143
}
4244

@@ -56,6 +58,7 @@ private function normalize(array $programs): array
5658
$program['boats'] = isset($program['boats'])
5759
? array_values($program['boats'])
5860
: [];
61+
5962
$newPrograms[] = $program;
6063
}
6164
}

tests/ProgramSaverTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ final class ProgramSaverTest extends TestCase
2727
protected function setUp(): void
2828
{
2929
parent::setUp();
30+
3031
$this->tempDir = sys_get_temp_dir() . '/program_saver_test_' . bin2hex(random_bytes(8));
32+
3133
if (!mkdir($this->tempDir, 0755, true) && !is_dir($this->tempDir)) {
3234
$this->fail('Failed to create temp dir: ' . $this->tempDir);
3335
}
@@ -62,6 +64,7 @@ protected function tearDown(): void
6264
public function testSave(): void
6365
{
6466
$saver = new ProgramSaver();
67+
6568
$path = $this->tempDir . '/programs.json';
6669

6770
$programs = [
@@ -111,6 +114,7 @@ public function testSave(): void
111114
$this->assertFileExists($path);
112115

113116
$content = json_decode(file_get_contents($path), true);
117+
114118
$this->assertArrayHasKey('programs', $content);
115119
$this->assertSame($programs, $content['programs']);
116120
}

tests/ProgramScraperTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ public function testScrape(): void
3131
$this->testScrapeData(0, 0),
3232
$this->testScrapeData(1, 0),
3333
]);
34+
3435
$scraper = new ProgramScraper($mockScraper);
36+
3537
$programs = $scraper->scrape(Carbon::create(2025, 7, 15, 0, 0, 0, 'Asia/Tokyo'));
38+
3639
$this->assertSame(array_merge(
3740
$this->testScrapeData(0, 0),
3841
$this->testScrapeData(1, 0)

0 commit comments

Comments
 (0)