Skip to content

Commit

Permalink
Declare callable return type
Browse files Browse the repository at this point in the history
The subclass may declare a more specific return type. Explicitly annotating it makes psalm aware that FuncService can only ever return callables and thus prevents a MixedFunctionCall error
  • Loading branch information
Biont authored Jun 16, 2022
1 parent ae05fb2 commit 85fdcd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Factories/FuncService.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function __construct(array $dependencies, callable $function)

/**
* @inheritDoc
* @return callable
*/
public function __invoke(ContainerInterface $c)
{
Expand Down

0 comments on commit 85fdcd5

Please sign in to comment.