Skip to content

Commit

Permalink
refactor: simplify foreach loop in order to remove unused variables.
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Telgenhof <me@sachatelgenhof.com>
  • Loading branch information
stelgenhof committed Jun 25, 2023
1 parent 6f87212 commit 3be9528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/SouthKorea/SouthKoreaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function testGenerationMethods(): void
$holidayProvider = Yasumi::create(self::REGION, $this->year);

$this->assertIsArray(SouthKorea::HOLIDAY_NAMES, 'Yasumi\Provider\SouthKorea::HOLIDAY_NAMES is not array');
foreach (SouthKorea::HOLIDAY_NAMES as $key => $names) {
foreach (array_keys(SouthKorea::HOLIDAY_NAMES) as $key) {
$this->assertTrue(method_exists($holidayProvider, $key), sprintf('Generation method `%s` is not declared in provider `%s`', $key, self::REGION));
}
}
Expand Down

0 comments on commit 3be9528

Please sign in to comment.