Skip to content

Commit

Permalink
Type-hint named()
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Jul 16, 2024
1 parent 5a9fa79 commit 711538b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/php/inject/Implementations.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function default() {
* @throws inject.ProvisionException if there is no such implementation
*/
#[Generic(return: 'T')]
public function named($name) {
public function named(string $name) {
if ($binding= $this->bindings[$name] ?? null) {
return $binding->resolve($this->inject);
}
Expand Down

0 comments on commit 711538b

Please sign in to comment.