| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | final class FloatPhpTypeSchemaResolver implements OpenApiPhpTypeSchemaResolverInterface |
||
| 25 | { |
||
| 26 | 3 | public function supportsPhpType(Type $phpType, Reflector $phpTypeHolder): bool |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritDoc |
||
| 33 | */ |
||
| 34 | 3 | public function resolvePhpTypeSchema(Type $phpType, Reflector $phpTypeHolder): array |
|
| 35 | { |
||
| 36 | 3 | $this->supportsPhpType($phpType, $phpTypeHolder) or throw new UnsupportedPhpTypeException(); |
|
| 37 | |||
| 38 | 3 | return [ |
|
| 39 | 3 | 'type' => Type::OAS_TYPE_NAME_NUMBER, |
|
| 40 | 3 | 'format' => 'double', |
|
| 41 | 3 | 'example' => 0.0, |
|
| 42 | 3 | ]; |
|
| 43 | } |
||
| 44 | |||
| 45 | 3 | public function getWeight(): int |
|
| 48 | } |
||
| 49 | } |
||
| 50 |