Skip to content

Commit 2ef961c

Browse files
committed
Use PHP functions as array_map callbacks when possible
1 parent de80374 commit 2ef961c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testTranslator()
224224
$this->assertEquals('translator.default', (string) $container->getAlias('translator'), '->registerTranslatorConfiguration() redefines translator service from identity to real translator');
225225
$options = $container->getDefinition('translator.default')->getArgument(3);
226226

227-
$files = array_map(function ($resource) { return realpath($resource); }, $options['resource_files']['en']);
227+
$files = array_map('realpath', $options['resource_files']['en']);
228228
$ref = new \ReflectionClass('Symfony\Component\Validator\Validation');
229229
$this->assertContains(
230230
strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),

0 commit comments

Comments
 (0)