@@ 50-63 (lines=14) @@ | ||
47 | ||
48 | protected function interact(InputInterface $input, OutputInterface $output) |
|
49 | { |
|
50 | if (!$input->getArgument('redirectUri')) { |
|
51 | $redirectUri = $this->getHelper('dialog')->askAndValidate( |
|
52 | $output, |
|
53 | 'Please choose an Redirect Uri:', |
|
54 | function($redirectUri) { |
|
55 | if (empty($redirectUri)) { |
|
56 | throw new \Exception('Redirect Uri can not be empty'); |
|
57 | } |
|
58 | ||
59 | return $redirectUri; |
|
60 | } |
|
61 | ); |
|
62 | $input->setArgument('redirectUri', $redirectUri); |
|
63 | } |
|
64 | ||
65 | if (!$input->getArgument('grantType')) { |
|
66 | $grantType = $this->getHelper('dialog')->askAndValidate( |
|
@@ 65-78 (lines=14) @@ | ||
62 | $input->setArgument('redirectUri', $redirectUri); |
|
63 | } |
|
64 | ||
65 | if (!$input->getArgument('grantType')) { |
|
66 | $grantType = $this->getHelper('dialog')->askAndValidate( |
|
67 | $output, |
|
68 | 'Please choose a Grant Types (separate multiple grant type with a space):', |
|
69 | function($grantType) { |
|
70 | if (empty($grantType)) { |
|
71 | throw new \Exception('Grant Type can not be empty'); |
|
72 | } |
|
73 | ||
74 | return $grantType; |
|
75 | } |
|
76 | ); |
|
77 | $input->setArgument('grantType', $grantType); |
|
78 | } |
|
79 | } |
|
80 | } |
|
81 |