Conditions | 5 |
Paths | 7 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
34 | public function run(Registry $registry): Registry |
||
35 | { |
||
36 | foreach ($this->getRegistryDbList($registry) as $dbName) { |
||
37 | $reflector = new Reflector(); |
||
38 | |||
39 | foreach ($registry as $regEntity) { |
||
40 | if ($registry->getDatabase($regEntity) !== $dbName) { |
||
41 | continue; |
||
42 | } |
||
43 | $reflector->addTable($registry->getTableSchema($regEntity)); |
||
44 | } |
||
45 | |||
46 | try { |
||
47 | $reflector->run(); |
||
48 | } catch (\Throwable $e) { |
||
49 | throw new SyncException($e->getMessage(), $e->getCode(), $e); |
||
50 | } |
||
51 | } |
||
52 | |||
53 | return $registry; |
||
54 | } |
||
76 |