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