Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b77c0f

Browse filesBrowse files
Update src/Symfony/Component/DependencyInjection/Argument/LazyClosure.php
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent 2cab4b7 commit 4b77c0f
Copy full SHA for 4b77c0f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Argument/LazyClosure.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Argument/LazyClosure.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function getCode(string $initializer, array $callable, Definition
8888
}
8989

9090
$code = 'new class('.$initializer.') extends \\'.self::class
91-
.$code.' { '.($methodReflector->getReturnType() instanceof \ReflectionNamedType && 'void' === $methodReflector->getReturnType()->getName() ? '' : 'return ').'$this->service->'.$callable[1].'('.$args.'); } '
91+
.$code.' { '.($methodReflector->hasReturnType() && 'void' === (string) $methodReflector->getReturnType() ? '' : 'return ').'$this->service->'.$callable[1].'('.$args.'); } '
9292
.'}';
9393

9494
return $asClosure ? '('.$code.')->'.$method.'(...)' : $code;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.