Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 3 | public function handle( |
|
37 | AbstractAnnotation $annotation, |
||
38 | ServiceMethodBuilder $serviceMethodBuilder, |
||
39 | ?Converter $converter, |
||
40 | ?int $index |
||
41 | ): void { |
||
42 | 3 | if (!$converter instanceof StringConverter) { |
|
43 | 1 | throw new InvalidArgumentException(sprintf( |
|
44 | 1 | 'Retrofit: Converter must be a StringConverter, %s found', |
|
45 | 1 | \gettype($converter) |
|
46 | )); |
||
47 | } |
||
48 | |||
49 | 2 | $serviceMethodBuilder->addParameterHandler($index, new UrlParamHandler($converter)); |
|
50 | 2 | } |
|
51 | } |
||
52 |