Skip to content

Commit d13a0c7

Browse files
authored
Merge pull request #307 from binaryfire/fix/container-return-types
Add missing return types to `Container::get()` and `Container::make()`
2 parents 7fa37ca + db5b9c8 commit d13a0c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/container/src/Container.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Container extends HyperfContainer implements ContainerContract, ArrayAcces
106106
* @throws \Hyperf\Di\Exception\NotFoundException no entry found for the given name
107107
* @throws InvalidArgumentException the name parameter must be of type string
108108
*/
109-
public function make(string $name, array $parameters = [])
109+
public function make(string $name, array $parameters = []): mixed
110110
{
111111
if ($this->isAlias($name)) {
112112
$name = $this->getAlias($name);
@@ -136,7 +136,7 @@ public function make(string $name, array $parameters = [])
136136
*
137137
* @param string $id identifier of the entry to look for
138138
*/
139-
public function get($id)
139+
public function get($id): mixed
140140
{
141141
if ($this->isAlias($id)) {
142142
$id = $this->getAlias($id);

0 commit comments

Comments
 (0)