Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| AutoIncrementTableToInt | |
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\StorageMetadata\Converters; |
| 3 | |
| 4 | use Apie\StorageMetadata\Interfaces\AutoIncrementTableInterface; |
| 5 | use Apie\TypeConverter\ConverterInterface; |
| 6 | use ReflectionType; |
| 7 | |
| 8 | /** |
| 9 | * @implements ConverterInterface<AutoIncrementTableInterface, ?int> |
| 10 | */ |
| 11 | class AutoIncrementTableToInt implements ConverterInterface |
| 12 | { |
| 13 | public function convert(AutoIncrementTableInterface $input, ?ReflectionType $wantedType): ?int |
| 14 | { |
| 15 | return $input->getKey(); |
| 16 | } |
| 17 | } |