| Total Complexity | 7 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class SyncSwitch extends Command |
||
| 8 | { |
||
| 9 | use Traits\SyncTrait; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * {@inheritdoc} |
||
| 13 | */ |
||
| 14 | protected $signature = 'contentful:sync-switch {--preview} {--live}'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | protected $description = 'Dump and switch the database'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * From sync to live? |
||
| 23 | * |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | protected function isFromSyncToLive(): bool |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Check if preview? |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | protected function isPreview(): bool |
||
| 39 | { |
||
| 40 | $bool = $this->option('preview'); |
||
| 41 | |||
| 42 | return ! empty($bool) ? true : false; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Execute the console command. |
||
| 47 | * |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | public function handle() |
||
| 63 | } |
||
| 64 | } |
||
| 66 |