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
StringToReflectionClassConverter
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 ReflectionClass;
6
7/**
8 * @implements ConverterInterface<class-string<object>, ReflectionClass<object>>
9 */
10final class StringToReflectionClassConverter implements ConverterInterface
11{
12    /**
13     * @template T of object
14     * @param class-string<T> $input
15     * @return ReflectionClass<T>
16     */
17    public function convert(string $input): ReflectionClass
18    {
19        return new ReflectionClass($input);
20    }
21}