Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| EnumConversionType | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| parseValue | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\Graphql\Types; |
| 3 | |
| 4 | use Apie\Core\ValueObjects\Utils; |
| 5 | use Apie\TypeConverter\ReflectionTypeFactory; |
| 6 | use GraphQL\Type\Definition\EnumType; |
| 7 | |
| 8 | class EnumConversionType extends EnumType |
| 9 | { |
| 10 | public function parseValue($value): mixed |
| 11 | { |
| 12 | return Utils::toTypehint( |
| 13 | ReflectionTypeFactory::createReflectionType($this->config['typehint']), |
| 14 | $value |
| 15 | ); |
| 16 | } |
| 17 | } |