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
ReflectionClassToString
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\StorageMetadata\Converters;
3
4use Apie\TypeConverter\ConverterInterface;
5use ReflectionClass;
6
7/**
8 * @template T of object
9 * @implements ConverterInterface<ReflectionClass<T>|null, class-string<T>|null>
10 */
11class ReflectionClassToString implements ConverterInterface
12{
13    /**
14     * @template U of object
15     * @param ReflectionClass<U>|null $input
16     * @return class-string<U>|null
17     */
18    public function convert(?ReflectionClass $input): ?string
19    {
20        return $input?->name;
21    }
22}