Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 1d94484

Browse files
committed
Remove return type hint from ApplicationConfigInjectionDelegator
The return type could potentially NOT be an `Application` in the situation that `$callback` returns something else.
1 parent d0bfba1 commit 1d94484

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Container/ApplicationConfigInjectionDelegator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ class ApplicationConfigInjectionDelegator
2121
/**
2222
* Decorate an Application instance by injecting routes and/or middleware
2323
* from configuration.
24+
*
25+
* @return mixed|Application Typically, this should return an Application
26+
* instance. However, if the delegator is attached to some other service,
27+
* there is a possibility it will return another type.
2428
*/
25-
public function __invoke(ContainerInterface $container, string $serviceName, callable $callback) : Application
29+
public function __invoke(ContainerInterface $container, string $serviceName, callable $callback)
2630
{
2731
$application = $callback();
2832
if (! $application instanceof Application) {

0 commit comments

Comments
 (0)