@@ -74,6 +74,7 @@ private function treatFields(InputInterface $input, OutputInterface $output): ar
7474 $ name = $ this ->promptName ($ io );
7575 $ heading = $ this ->promptHeading ($ io );
7676 $ description = $ this ->promptDescription ($ io );
77+ $ requirements = $ this ->promptRequirements ($ io );
7778 $ author = $ this ->promptAuthor ($ io );
7879 $ email = $ this ->promptEmail ($ io );
7980 $ webpage = $ this ->promptHomepageUrl ($ io );
@@ -84,6 +85,7 @@ private function treatFields(InputInterface $input, OutputInterface $output): ar
8485 'name ' => $ name ,
8586 'heading ' => $ heading ,
8687 'description ' => $ description ,
88+ 'requirements ' => $ requirements ,
8789 'author ' => $ author ,
8890 'email ' => $ email ,
8991 'webpage ' => $ webpage ,
@@ -99,21 +101,21 @@ private function treatFields(InputInterface $input, OutputInterface $output): ar
99101
100102 private function promptName (SymfonyStyle $ io ): string
101103 {
102- $ heading = $ io ->ask ('Project Name ' );
104+ $ name = $ io ->ask ('Project Name ' );
103105
104- if (!$ this ->isFieldFilled ($ heading )) {
106+ if (!$ this ->isFieldFilled ($ name )) {
105107 throw new EmptyFieldException ('Mention a name for your project 😺 ' );
106108 }
107109
108- return $ heading ;
110+ return $ name ;
109111 }
110112
111113 private function promptHeading (SymfonyStyle $ io ): string
112114 {
113- $ heading = $ io ->ask ('Project Heading ' );
115+ $ heading = $ io ->ask ('Project Heading/Summary ' );
114116
115117 if (!$ this ->isFieldFilled ($ heading )) {
116- throw new EmptyFieldException ('Mention the README heading. ' );
118+ throw new EmptyFieldException ('Mention the README heading or a small summary . ' );
117119 }
118120
119121 return $ heading ;
@@ -130,6 +132,17 @@ private function promptDescription(SymfonyStyle $io): string
130132 return $ description ;
131133 }
132134
135+ private function promptRequirements (SymfonyStyle $ io ): string
136+ {
137+ $ requirements = $ io ->ask ('Requirements / Installation? ' );
138+
139+ if (!$ this ->isFieldFilled ($ requirements )) {
140+ throw new EmptyFieldException ('What are the requirements/Installation steps for this project? ' );
141+ }
142+
143+ return $ requirements ;
144+ }
145+
133146 private function promptAuthor (SymfonyStyle $ io ): string
134147 {
135148 $ authorName = $ io ->ask ('Author Name ' );
@@ -143,7 +156,7 @@ private function promptAuthor(SymfonyStyle $io): string
143156
144157 private function promptEmail (SymfonyStyle $ io ): string
145158 {
146- $ email = $ io ->ask ('Author Email ' );
159+ $ email = $ io ->ask ('Author Email (will be also used for your gravatar) ' );
147160
148161 if (!$ this ->isFieldFilled ($ email )) {
149162 throw new EmptyFieldException ('Author email is required. ' );
0 commit comments