Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ValueObjectToAutoIncrementTable
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 convert
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\StorageMetadata\Converters;
3
4use Apie\Core\ValueObjects\Interfaces\ValueObjectInterface;
5use Apie\StorageMetadata\Interfaces\AutoIncrementTableInterface;
6use Apie\TypeConverter\ConverterInterface;
7use Apie\TypeConverter\TypeConverter;
8use ReflectionType;
9
10/**
11 * @implements ConverterInterface<?ValueObjectInterface, AutoIncrementTableInterface>
12 */
13class ValueObjectToAutoIncrementTable implements ConverterInterface
14{
15    public function convert(?ValueObjectInterface $input, ?ReflectionType $wantedType, ?TypeConverter $typeConverter = null): AutoIncrementTableInterface
16    {
17        assert($typeConverter !== null);
18        $input = $input->toNative();
19        return $typeConverter->convertTo($input, $wantedType);
20    }
21}