Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public static function createForFunction(ReflectionFunctionAbstract $function, string $parameter) : self |
||
12 | { |
||
13 | if ($function instanceof ReflectionMethod) { |
||
14 | return new self( |
||
15 | sprintf( |
||
16 | "Container cannot resolve parameter (%s) in (%s::%s)", |
||
17 | $parameter, |
||
18 | $function->getDeclaringClass(), |
||
19 | $function->getName() |
||
20 | ) |
||
21 | ); |
||
22 | } |
||
23 | |||
24 | return new self( |
||
25 | sprintf("Container cannot resolve parameter (%s)", $parameter) |
||
26 | ); |
||
29 |