| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Migrations extends AbstractGenerator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * {@inheritdoc} |
||
| 12 | */ |
||
| 13 | protected $signature = 'contentful:generate-migrations'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | */ |
||
| 18 | protected $description = 'Generate migrations from Contentful content-types'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Execute the console command. |
||
| 22 | * |
||
| 23 | * @return void |
||
| 24 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
| 25 | * @throws \Exception |
||
| 26 | */ |
||
| 27 | public function handle() |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Create migration file for given content-type. |
||
| 46 | * |
||
| 47 | * @param array $contentType |
||
| 48 | * @return string |
||
| 49 | * @throws \Exception |
||
| 50 | */ |
||
| 51 | private function createMigration($contentType): string |
||
| 64 |