Replaced regular callbacks by arrow functions when possible

This commit is contained in:
Alejandro Celaya
2019-12-29 23:16:55 +01:00
parent a830420d75
commit bfeb915cd2
19 changed files with 42 additions and 75 deletions

View File

@@ -50,9 +50,7 @@ class GeolocationDbUpdaterTest extends TestCase
/** @test */
public function exceptionIsThrownWhenOlderDbDoesNotExistAndDownloadFails(): void
{
$mustBeUpdated = function () {
$this->assertTrue(true);
};
$mustBeUpdated = fn () => $this->assertTrue(true);
$prev = new RuntimeException('');
$fileExists = $this->dbUpdater->databaseFileExists()->willReturn(false);
@@ -148,8 +146,6 @@ class GeolocationDbUpdaterTest extends TestCase
public function provideSmallDays(): iterable
{
return map(range(0, 34), function (int $days) {
return [$days];
});
return map(range(0, 34), fn (int $days) => [$days]);
}
}