| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 16 | final class MigrationConfig extends InjectableConfig |
||
| 17 | { |
||
| 18 | public const CONFIG = 'migration'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Migrations directory. |
||
| 22 | * |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | public function getDirectory(): string |
||
| 26 | { |
||
| 27 | return $this->config['directory'] ?? ''; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Table to store list of executed migrations. |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public function getTable(): string |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Is it safe to run migration without user confirmation? Attention, this option does not |
||
| 42 | * used in component directly and left for component consumers. |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public function isSafe(): bool |
||
| 47 | { |
||
| 48 | return $this->config['safe'] ?? false; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Namespace for generated migration class |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getNamespace(): string |
||
| 59 | } |
||
| 60 | } |
||
| 61 |