| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class DocBlockServiceResolver extends AbstractClassResolver |
||
| 10 | { |
||
| 11 | 29 | public function __construct( |
|
| 14 | 29 | } |
|
| 15 | |||
| 16 | /** |
||
| 17 | * @param object|class-string $caller |
||
|
|
|||
| 18 | * |
||
| 19 | * @throws DocBlockServiceNotFoundException |
||
| 20 | */ |
||
| 21 | 29 | public function resolve(object|string $caller): object |
|
| 22 | { |
||
| 23 | 29 | $resolved = $this->doResolve($caller); |
|
| 24 | |||
| 25 | 29 | if ($resolved === null) { |
|
| 26 | 1 | throw new DocBlockServiceNotFoundException($caller, $this->resolvableType); |
|
| 27 | } |
||
| 28 | |||
| 29 | 28 | return $resolved; |
|
| 30 | } |
||
| 31 | |||
| 32 | 29 | protected function getResolvableType(): string |
|
| 35 | } |
||
| 36 | } |
||
| 37 |