Skip to content

Commit

Permalink
feat: add return type hints
Browse files Browse the repository at this point in the history
This patch adds a return type hint to `ContainerInterface::has()`, per
the already documented specification, in preparation for a v3 release.
No other methods were eligible, as they specified `mixed`.

See https://www.php-fig.org/blog/2019/10/upgrading-psr-interfaces/

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
  • Loading branch information
weierophinney committed Jun 17, 2020
1 parent 6c2bc7f commit de1921e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -21,7 +21,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.0.x-dev"
}
}
}
2 changes: 1 addition & 1 deletion src/ContainerInterface.php
Expand Up @@ -32,5 +32,5 @@ public function get(string $id);
*
* @return bool
*/
public function has(string $id);
public function has(string $id): bool;
}

0 comments on commit de1921e

Please sign in to comment.