| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class SchemaCreator { |
||
| 12 | |||
| 13 | private EntityManager $entityManager; |
||
| 14 | |||
| 15 | public function __construct( EntityManager $entityManager ) { |
||
| 16 | $this->entityManager = $entityManager; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function createSchema(): void { |
||
| 20 | $this->getSchemaTool()->createSchema( $this->getClassMetaData() ); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function dropSchema(): void { |
||
| 24 | $this->getSchemaTool()->dropSchema( $this->getClassMetaData() ); |
||
| 25 | } |
||
| 26 | |||
| 27 | private function getSchemaTool(): SchemaTool { |
||
| 28 | return new SchemaTool( $this->entityManager ); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return array<int, ClassMetadata> |
||
| 33 | */ |
||
| 34 | private function getClassMetaData(): array { |
||
| 36 | } |
||
| 37 | } |
||
| 38 |