File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,11 +137,6 @@ private function promptName(SymfonyStyle $io): string
137137 return $ name ;
138138 }
139139
140- private function isFieldFilled (?string $ string ): bool
141- {
142- return !empty ($ string ) && strlen ($ string ) > 0 ;
143- }
144-
145140 private function promptHeading (SymfonyStyle $ io ): string
146141 {
147142 $ heading = $ io ->ask ('Project Heading/Summary ' );
@@ -188,7 +183,7 @@ private function promptAuthor(SymfonyStyle $io): string
188183
189184 private function promptEmail (SymfonyStyle $ io ): string
190185 {
191- $ email = $ io ->ask ('Valid Author Email (will also be used for your gravatar) ' , $ this ->composerData ['authors ' ][0 ]['name ' ]);
186+ $ email = $ io ->ask ('Valid Author Email (will also be used for your gravatar) ' , $ this ->composerData ['authors ' ][0 ]['email ' ]);
192187
193188 if (!$ this ->isFieldFilled ($ email )) {
194189 throw new EmptyFieldException ('Author email is required. ' );
@@ -204,7 +199,9 @@ private function promptEmail(SymfonyStyle $io): string
204199
205200 private function promptHomepageUrl (SymfonyStyle $ io ): string
206201 {
207- $ webpage = $ io ->ask ('Valid Author Webpage (e.g. https://pierre.com) ' );
202+ $ personalHomepage = !empty ($ this ->composerData ['authors ' ][0 ]['homepage ' ]) ? $ this ->composerData ['authors ' ][0 ]['homepage ' ] : $ this ->composerData ['homepage ' ];
203+
204+ $ webpage = $ io ->ask ('Valid Author Webpage (e.g. https://pierre.com) ' , $ personalHomepage );
208205
209206
210207 if (!$ this ->isFieldFilled ($ webpage )) {
You can’t perform that action at this time.
0 commit comments