| Conditions | 4 |
| Paths | 2 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function process(SymfonyStyle $io, CustomizableAppConfig $appConfig): void |
||
| 15 | { |
||
| 16 | $io->title('APPLICATION'); |
||
| 17 | |||
| 18 | if ($appConfig->hasApp() && $io->confirm('Do you want to keep imported application config?')) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | |||
| 22 | $validator = function ($value) { |
||
| 23 | return $value; |
||
| 24 | }; |
||
| 25 | $appConfig->setApp([ |
||
| 26 | 'SECRET' => $io->ask( |
||
| 27 | 'Define a secret string that will be used to sign API tokens (leave empty to autogenerate one)', |
||
| 28 | null, |
||
| 29 | $validator |
||
| 30 | ) ?: $this->generateRandomString(32), |
||
| 31 | 'DISABLE_TRACK_PARAM' => $io->ask( |
||
| 32 | 'Provide a parameter name that you will be able to use to disable tracking on specific request to ' |
||
| 33 | . 'short URLs (leave empty and this feature won\'t be enabled)', |
||
| 34 | null, |
||
| 35 | $validator |
||
| 36 | ), |
||
| 37 | ]); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |