Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
ReflectionClassToReflectionTypeConverter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
convert | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\Core\TypeConverters; |
3 | |
4 | use Apie\TypeConverter\ConverterInterface; |
5 | use Apie\TypeConverter\ReflectionTypeFactory; |
6 | use ReflectionClass; |
7 | use ReflectionType; |
8 | |
9 | /** |
10 | * @implements ConverterInterface<ReflectionClass, ReflectionType> |
11 | */ |
12 | class ReflectionClassToReflectionTypeConverter implements ConverterInterface |
13 | { |
14 | /** |
15 | * @param ReflectionClass<object> $input |
16 | */ |
17 | public function convert(ReflectionClass $input): ReflectionType |
18 | { |
19 | return ReflectionTypeFactory::createReflectionType($input->name); |
20 | } |
21 | } |