@@ -23,20 +23,20 @@ final class AddArticle extends BaseCommand
2323{
2424 public function execute (InputInterface $ input , OutputInterface $ output ): int
2525 {
26- $ helper = $ this ->getQuestionHelper ();
26+ $ questionHelper = $ this ->getQuestionHelper ();
2727 $ authorQuestion = new TextQuestion (
2828 'Please enter the name of the author: ' ,
2929 new NonEmptyStringValidator ('Author ' ),
3030 new StringSanitizer (),
3131 );
32- $ author = $ helper ->ask ($ input , $ output , $ authorQuestion ->getQuestion ());
32+ $ author = $ questionHelper ->ask ($ input , $ output , $ authorQuestion ->getQuestion ());
3333 $ output ->writeln (sprintf ('You have just selected: %s ' , $ author ));
3434 $ titleQuestion = new TextQuestion (
3535 'Please enter the title of the article: ' ,
3636 new NonEmptyStringValidator ('Title ' ),
3737 new StringSanitizer (),
3838 );
39- $ title = $ helper ->ask ($ input , $ output , $ titleQuestion ->getQuestion ());
39+ $ title = $ questionHelper ->ask ($ input , $ output , $ titleQuestion ->getQuestion ());
4040 $ output ->writeln (sprintf ('You have just typed: %s ' , $ title ));
4141 $ urlQuestion = new TextQuestion (
4242 'Please enter the URL of the article: ' ,
@@ -48,18 +48,18 @@ public function execute(InputInterface $input, OutputInterface $output): int
4848 ),
4949 new StringSanitizer (),
5050 );
51- $ url = $ helper ->ask ($ input , $ output , $ urlQuestion ->getQuestion ());
51+ $ url = $ questionHelper ->ask ($ input , $ output , $ urlQuestion ->getQuestion ());
5252 $ output ->writeln (sprintf ('You have just typed: %s ' , $ url ));
5353 $ tagQuestion = new TagQuestion ();
54- $ chosenTag = $ helper ->ask ($ input , $ output , $ tagQuestion ->getQuestion ());
54+ $ chosenTag = $ questionHelper ->ask ($ input , $ output , $ tagQuestion ->getQuestion ());
5555 $ tag = Tag::from ($ chosenTag );
5656 $ output ->writeln (sprintf ('You have just selected: %s ' , $ tag ->value ));
5757 $ descriptionQuestion = new TextQuestion (
5858 'Please enter the description of the article (optional): ' ,
5959 new AlwaysValidValidator (),
6060 new StringSanitizer (),
6161 );
62- $ description = $ helper ->ask ($ input , $ output , $ descriptionQuestion ->getQuestion ());
62+ $ description = $ questionHelper ->ask ($ input , $ output , $ descriptionQuestion ->getQuestion ());
6363 $ output ->writeln (sprintf ('You have just typed: %s ' , $ description ));
6464 $ output ->writeln (
6565 implode (
@@ -77,7 +77,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
7777 )
7878 );
7979 $ confirmationQuestion = new ConfirmationQuestion ('Continue adding article? ' );
80- if (!$ helper ->ask ($ input , $ output , $ confirmationQuestion )) {
80+ if (!$ questionHelper ->ask ($ input , $ output , $ confirmationQuestion )) {
8181 $ output ->writeln ('Nothing is added ' );
8282 return Command::SUCCESS ;
8383 }
0 commit comments