Skip to content

Commit b3313c2

Browse files
More short closures
1 parent d81586b commit b3313c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Test/ServiceLocatorTestCase.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ protected function getServiceLocator(array $factories): ContainerInterface
2727
public function testHas()
2828
{
2929
$locator = $this->getServiceLocator([
30-
'foo' => function () { return 'bar'; },
31-
'bar' => function () { return 'baz'; },
32-
function () { return 'dummy'; },
30+
'foo' => fn () => 'bar',
31+
'bar' => fn () => 'baz',
32+
fn () => 'dummy',
3333
]);
3434

3535
$this->assertTrue($locator->has('foo'));
@@ -40,8 +40,8 @@ function () { return 'dummy'; },
4040
public function testGet()
4141
{
4242
$locator = $this->getServiceLocator([
43-
'foo' => function () { return 'bar'; },
44-
'bar' => function () { return 'baz'; },
43+
'foo' => fn () => 'bar',
44+
'bar' => fn () => 'baz',
4545
]);
4646

4747
$this->assertSame('bar', $locator->get('foo'));

0 commit comments

Comments
 (0)