| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class SchemaFactory |
||
| 16 | { |
||
| 17 | /** @var Collection<int, Schema> */ |
||
| 18 | private Collection $schemas; |
||
| 19 | |||
| 20 | public function __construct(OAReader $oaReader) |
||
| 21 | { |
||
| 22 | $this->schemas = new Collection($oaReader->read()->components->schemas);; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Creates single JSON schema for provided class name |
||
| 27 | */ |
||
| 28 | public function create(string $className): string |
||
| 56 | ]); |
||
| 57 | } |
||
| 59 |