Skip to content

Commit 26e07ee

Browse files
committed
Add type hints for recent versions of ContainerInterface
1 parent 82c96fd commit 26e07ee

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/InMemoryContainer.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ final class InMemoryContainer implements ContainerInterface
1616
private $services = [];
1717

1818
/**
19-
* @param string $id
2019
* @return mixed
2120
*/
22-
public function get($id)
21+
public function get(string $id)
2322
{
2423
if (! $this->has($id)) {
2524
throw new class ($id . ' was not found') extends RuntimeException implements NotFoundExceptionInterface {
@@ -29,11 +28,7 @@ public function get($id)
2928
return $this->services[$id];
3029
}
3130

32-
/**
33-
* @param string $id
34-
* @return bool
35-
*/
36-
public function has($id)
31+
public function has(string $id): bool
3732
{
3833
return array_key_exists($id, $this->services);
3934
}

0 commit comments

Comments
 (0)