| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 14 | public function handle(Configuration $config, array $data) |
||
| 15 | { |
||
| 16 | // MySQL: Importing workspace data |
||
| 17 | $this->logger->info('MYSQL: Importing existing workspace data'); |
||
| 18 | |||
| 19 | if (is_file(WORKSPACE . '/install.sql')) { |
||
| 20 | try { |
||
| 21 | Symphony::Database()->import(file_get_contents(WORKSPACE . '/install.sql')); |
||
| 22 | } catch (DatabaseException $e) { |
||
| 23 | throw new Exception(sprintf( |
||
| 24 | 'There was an error while trying to import data to the database. MySQL returned: %s:%s', |
||
| 25 | $e->getDatabaseErrorCode(), |
||
| 26 | $e->getDatabaseErrorMessage() |
||
| 27 | )); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | return true; |
||
| 32 | } |
||
| 33 | } |
||
| 34 |