@@ -29,32 +29,25 @@ public function configure(): void
2929 ->setDefinition (
3030 new InputDefinition (
3131 [
32- new InputArgument ('path ' , InputArgument::REQUIRED | InputArgument:: IS_ARRAY , 'The path to analyse ' ),
32+ new InputArgument ('path ' , InputArgument::REQUIRED , 'The path to analyse ' ),
3333 ]
3434 )
3535 );
3636 }
3737
3838 public function execute (InputInterface $ input , OutputInterface $ output ): int
3939 {
40- $ pathArray = $ input ->getArgument ('path ' );
41- if (!$ pathArray ) {
42- // fallback
43- $ pathArray = ['. ' ];
44- }
45- $ realPath = null ;
46- \assert (\is_array ($ pathArray ));
47- foreach ($ pathArray as $ pathItem ) {
48- $ realPath = \realpath ($ pathItem );
49- \assert (\is_string ($ realPath ));
50-
51- if (!$ realPath || !\file_exists ($ realPath )) {
52- $ output ->writeln ('------------------------------- ' );
53- $ output ->writeln ('The path " ' . $ pathItem . '" does not exists. ' );
54- $ output ->writeln ('------------------------------- ' );
55-
56- return 2 ;
57- }
40+ $ path = $ input ->getArgument ('path ' );
41+ \assert (\is_string ($ path ));
42+ $ realPath = \realpath ($ path );
43+ \assert (\is_string ($ realPath ));
44+
45+ if (!$ realPath || !\file_exists ($ realPath )) {
46+ $ output ->writeln ('------------------------------- ' );
47+ $ output ->writeln ('The path " ' . $ path . '" does not exists. ' );
48+ $ output ->writeln ('------------------------------- ' );
49+
50+ return 2 ;
5851 }
5952
6053 $ xmlReader = new \voku \PhpDocFixer \ReadXmlDocs \XmlReader ($ realPath );
@@ -80,7 +73,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
8073 }
8174 }
8275
83- $ output ->writeln ($ realPath );
76+ $ output ->writeln (\count ( $ errors ) . ' ' . ' errors found ' );
8477
8578 foreach ($ errors as $ name => $ typesArray ) {
8679 $ output ->writeln ('---------------- ' );
0 commit comments