Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | namespace Apie\SchemaGenerator\Interfaces; |
3 | |
4 | use Apie\SchemaGenerator\Builders\ComponentsBuilder; |
5 | use cebe\openapi\spec\Components; |
6 | use ReflectionClass; |
7 | |
8 | /** |
9 | * @template T of object |
10 | */ |
11 | interface SchemaProvider |
12 | { |
13 | /** |
14 | * @param ReflectionClass<object> $class |
15 | */ |
16 | public function supports(ReflectionClass $class): bool; |
17 | |
18 | /** |
19 | * @param ReflectionClass<T> $class |
20 | */ |
21 | public function addDisplaySchemaFor( |
22 | ComponentsBuilder $componentsBuilder, |
23 | string $componentIdentifier, |
24 | ReflectionClass $class, |
25 | bool $nullable = false |
26 | ): Components; |
27 | |
28 | /** |
29 | * @param ReflectionClass<T> $class |
30 | */ |
31 | public function addCreationSchemaFor( |
32 | ComponentsBuilder $componentsBuilder, |
33 | string $componentIdentifier, |
34 | ReflectionClass $class, |
35 | bool $nullable = false |
36 | ): Components; |
37 | } |