Skip to content

Commit 2273787

Browse files
committed
Fix template
1 parent 40d0b06 commit 2273787

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

src/Bar.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Psr\Container;
4+
5+
class Bar
6+
{
7+
public function test(): int
8+
{
9+
return 1;
10+
}
11+
}

src/ContainerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ContainerInterface
1212
/**
1313
* Finds an entry of the container by its identifier and returns it.
1414
*
15-
* @template T of mixed
15+
* @template T of object
1616
*
1717
* @param class-string<T>|string $id Identifier of the entry to look for.
1818
*

src/Foo.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Psr\Container;
4+
5+
class Foo
6+
{
7+
public function test(ContainerInterface $context): void
8+
{
9+
$context->get(Bar::class)->test()
10+
}
11+
}

0 commit comments

Comments
 (0)