Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 3 | public function resolvePhpTypeSchema(Type $phpType, Reflector $phpTypeHolder): array |
|
40 | { |
||
41 | 3 | $this->supportsPhpType($phpType, $phpTypeHolder) or throw new UnsupportedPhpTypeException(); |
|
42 | |||
43 | 3 | $phpTypeSchema = [ |
|
44 | 3 | 'type' => Type::OAS_TYPE_NAME_STRING, |
|
45 | 3 | ]; |
|
46 | |||
47 | 3 | if (is_a($phpType->name, Uuid::class, true)) { |
|
48 | 3 | $phpTypeSchema['format'] = 'uuid'; |
|
49 | } |
||
50 | |||
51 | 3 | return $phpTypeSchema; |
|
52 | } |
||
59 |