Conditions | 2 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | 1 | public function getValues(OutputInterface $output, DialogHelper $dialog) |
|
52 | { |
||
53 | 1 | $default = $this->getDefault(); |
|
54 | |||
55 | 1 | $value = $dialog->askAndValidate( |
|
56 | 1 | $output, |
|
57 | 1 | "<info>Author email</info> ({$default}): ", |
|
58 | 1 | function ($email) { |
|
59 | 1 | if (false === filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
60 | 1 | throw new RuntimeException('Not a valid email'); |
|
61 | } |
||
62 | |||
63 | 1 | return $email; |
|
64 | 1 | }, |
|
65 | 1 | false, |
|
66 | $default |
||
67 | 1 | ); |
|
68 | |||
69 | 1 | return ['author_email' => $value]; |
|
70 | } |
||
71 | } |
||
72 |