Skip to content

Commit e8fed5d

Browse files
committed
Add Injector stub
1 parent 9fe3d99 commit e8fed5d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

phpstan.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ parameters:
2121
ignoreErrors:
2222
-
2323
message: '#but return statement is missing#'
24-
path: tests/ResourceRepositoryTest.php
24+
path: tests/ResourceRepositoryTest.php
25+
stubFiles:
26+
- tests/stubs/Injector.phpstub

tests/stubs/Injector.phpstub

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Ray\Di;
6+
7+
class Injector
8+
{
9+
/**
10+
* @param class-string<T> $interface
11+
* @param string $name
12+
*
13+
* @return T
14+
* @template T of object
15+
*/
16+
public function getInstance($interface, $name = Name::ANY)
17+
{}
18+
}

0 commit comments

Comments
 (0)