Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ReflectionClassToReflectionTypeConverter
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 convert
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Core\TypeConverters;
3
4use Apie\TypeConverter\ConverterInterface;
5use Apie\TypeConverter\ReflectionTypeFactory;
6use ReflectionClass;
7use ReflectionType;
8
9/**
10 * @implements ConverterInterface<ReflectionClass, ReflectionType>
11 */
12class 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}