3
3
namespace PHPStan \Type \Symfony ;
4
4
5
5
use Symfony \Component \Console \Command \Command ;
6
+ use Symfony \Component \Console \Input \InputArgument ;
6
7
use Symfony \Component \Console \Input \InputInterface ;
7
8
use Symfony \Component \Console \Output \OutputInterface ;
8
9
use function PHPStan \Testing \assertType ;
@@ -14,16 +15,18 @@ protected function configure(): void
14
15
{
15
16
parent ::configure ();
16
17
18
+ $ this ->addArgument ('required ' , InputArgument::REQUIRED );
17
19
$ this ->addArgument ('base ' );
18
20
}
19
21
20
22
protected function interact (InputInterface $ input , OutputInterface $ output ): int
21
23
{
22
24
assertType ('string|null ' , $ input ->getArgument ('base ' ));
23
- assertType ('string|null ' , $ input ->getArgument ('aaa ' ));
24
- assertType ('string|null ' , $ input ->getArgument ('bbb ' ));
25
- assertType ('array<int, string>|string|null ' , $ input ->getArgument ('diff ' ));
26
- assertType ('array<int, string>|null ' , $ input ->getArgument ('arr ' ));
25
+ assertType ('string ' , $ input ->getArgument ('aaa ' ));
26
+ assertType ('string ' , $ input ->getArgument ('bbb ' ));
27
+ assertType ('string|null ' , $ input ->getArgument ('required ' ));
28
+ assertType ('array<int, string>|string ' , $ input ->getArgument ('diff ' ));
29
+ assertType ('array<int, string> ' , $ input ->getArgument ('arr ' ));
27
30
assertType ('string|null ' , $ input ->getArgument ('both ' ));
28
31
assertType ('Symfony\Component\Console\Helper\QuestionHelper ' , $ this ->getHelper ('question ' ));
29
32
}
@@ -33,6 +36,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
33
36
assertType ('string|null ' , $ input ->getArgument ('base ' ));
34
37
assertType ('string ' , $ input ->getArgument ('aaa ' ));
35
38
assertType ('string ' , $ input ->getArgument ('bbb ' ));
39
+ assertType ('string ' , $ input ->getArgument ('required ' ));
36
40
assertType ('array<int, string>|string ' , $ input ->getArgument ('diff ' ));
37
41
assertType ('array<int, string> ' , $ input ->getArgument ('arr ' ));
38
42
assertType ('string|null ' , $ input ->getArgument ('both ' ));
0 commit comments