| Conditions | 5 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 30 | public function run(Registry $registry): Registry |
||
| 31 | { |
||
| 32 | $reflector = new Reflector(); |
||
| 33 | foreach ($registry as $entity) { |
||
| 34 | if (!$registry->hasTable($entity) || $entity->getOptions()->has(self::READONLY_SCHEMA)) { |
||
| 35 | continue; |
||
| 36 | } |
||
| 37 | |||
| 38 | $reflector->addTable($registry->getTableSchema($entity)); |
||
| 39 | } |
||
| 40 | |||
| 41 | try { |
||
| 42 | $reflector->run(); |
||
| 43 | } catch (\Throwable $e) { |
||
| 44 | throw new SyncException($e->getMessage(), $e->getCode(), $e); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $registry; |
||
| 48 | } |
||
| 49 | } |