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

@@ -42,9 +42,9 @@ class ListShortUrlsCommandTest extends TestCase
$data[] = new ShortUrl('url_' . $i);
}
$this->shortUrlService->listShortUrls(Argument::cetera())->will(function () use (&$data) {
return new Paginator(new ArrayAdapter($data));
})->shouldBeCalledTimes(3);
$this->shortUrlService->listShortUrls(Argument::cetera())
->will(fn () => new Paginator(new ArrayAdapter($data)))
->shouldBeCalledTimes(3);
$this->commandTester->setInputs(['y', 'y', 'n']);
$this->commandTester->execute([]);