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