@@ -38,7 +38,7 @@ class CompatibilityCheckCommand extends AbstractCommand
3838 * @param CompatibilityChecker $compatibilityChecker
3939 */
4040 public function __construct (
41- private readonly CompatibilityChecker $ compatibilityChecker
41+ private readonly CompatibilityChecker $ compatibilityChecker,
4242 ) {
4343 parent ::__construct ();
4444 }
@@ -50,32 +50,33 @@ public function __construct(
5050 */
5151 protected function configure (): void
5252 {
53- $ this ->setName ($ this ->getCommandName ('hyva ' , 'compatibility:check ' ))
53+ $ this
54+ ->setName ($ this ->getCommandName ('hyva ' , 'compatibility:check ' ))
5455 ->setDescription ('Check modules for Hyvä theme compatibility issues ' )
5556 ->setAliases (['hyva:check ' ])
5657 ->addOption (
5758 self ::OPTION_SHOW_ALL ,
5859 'a ' ,
5960 InputOption::VALUE_NONE ,
60- 'Show all modules including compatible ones '
61+ 'Show all modules including compatible ones ' ,
6162 )
6263 ->addOption (
6364 self ::OPTION_THIRD_PARTY_ONLY ,
6465 't ' ,
6566 InputOption::VALUE_NONE ,
66- 'Check only third-party modules (exclude Magento_* modules) '
67+ 'Check only third-party modules (exclude Magento_* modules) ' ,
6768 )
6869 ->addOption (
6970 self ::OPTION_INCLUDE_VENDOR ,
7071 null ,
7172 InputOption::VALUE_NONE ,
72- 'Include Magento core modules (default: third-party modules only) '
73+ 'Include Magento core modules (default: third-party modules only) ' ,
7374 )
7475 ->addOption (
7576 self ::OPTION_DETAILED ,
7677 'd ' ,
7778 InputOption::VALUE_NONE ,
78- 'Show detailed file-level issues for incompatible modules '
79+ 'Show detailed file-level issues for incompatible modules ' ,
7980 );
8081 }
8182
@@ -89,7 +90,8 @@ protected function configure(): void
8990 protected function executeCommand (InputInterface $ input , OutputInterface $ output ): int
9091 {
9192 // Check if we're in interactive mode (no options provided)
92- $ hasOptions = $ input ->getOption (self ::OPTION_SHOW_ALL )
93+ $ hasOptions =
94+ $ input ->getOption (self ::OPTION_SHOW_ALL )
9395 || $ input ->getOption (self ::OPTION_THIRD_PARTY_ONLY )
9496 || $ input ->getOption (self ::OPTION_INCLUDE_VENDOR )
9597 || $ input ->getOption (self ::OPTION_DETAILED );
@@ -142,10 +144,7 @@ private function runInteractiveMode(InputInterface $input, OutputInterface $outp
142144 $ scope = $ scopePrompt ->prompt ();
143145
144146 // Detailed view confirmation
145- $ detailedPrompt = new ConfirmPrompt (
146- label: 'Show detailed file-level issues? ' ,
147- default: false ,
148- );
147+ $ detailedPrompt = new ConfirmPrompt (label: 'Show detailed file-level issues? ' , default: false );
149148
150149 $ detailed = $ detailedPrompt ->prompt ();
151150
@@ -221,9 +220,8 @@ private function runScan(
221220 bool $ includeVendor ,
222221 bool $ detailed ,
223222 bool $ incompatibleOnly ,
224- OutputInterface $ output
223+ OutputInterface $ output,
225224 ): int {
226-
227225 // Determine filter logic:
228226 // - thirdPartyOnly: Only scan non-Magento_* modules (default behavior)
229227 // - includeVendor: Also scan Magento_* core modules
@@ -237,7 +235,7 @@ private function runScan(
237235 $ output ,
238236 $ showAll ,
239237 $ scanThirdPartyOnly ,
240- $ excludeVendor
238+ $ excludeVendor,
241239 );
242240
243241 // Determine display mode:
@@ -266,9 +264,7 @@ private function runScan(
266264 $ this ->io ->newLine ();
267265
268266 // Return appropriate exit code
269- return $ results ['summary ' ]['criticalIssues ' ] > 0
270- ? Cli::RETURN_FAILURE
271- : Cli::RETURN_SUCCESS ;
267+ return $ results ['summary ' ]['criticalIssues ' ] > 0 ? Cli::RETURN_FAILURE : Cli::RETURN_SUCCESS ;
272268 }
273269
274270 /**
@@ -289,10 +285,7 @@ private function displayResults(array $results, bool $showAll): void
289285 return ;
290286 }
291287
292- $ this ->io ->table (
293- ['Module ' , 'Status ' , 'Issues ' ],
294- $ tableData
295- );
288+ $ this ->io ->table (['Module ' , 'Status ' , 'Issues ' ], $ tableData );
296289 }
297290
298291 /**
@@ -327,7 +320,7 @@ private function displayDetailedIssues(array $results): void
327320 $ color ,
328321 $ symbol ,
329322 $ issue ['line ' ],
330- $ issue ['description ' ]
323+ $ issue ['description ' ],
331324 ));
332325 }
333326 }
@@ -367,15 +360,15 @@ private function displaySummary(array $results): void
367360 $ this ->io ->writeln (sprintf (
368361 '<fg=red>⚠</> Found <fg=red;options=bold>%d critical compatibility issue(s)</> in %d scanned modules. ' ,
369362 $ summary ['criticalIssues ' ],
370- $ summary ['total ' ]
363+ $ summary ['total ' ],
371364 ));
372365 $ this ->io ->writeln ('These modules require modifications to work with Hyvä themes. ' );
373366 } elseif ($ summary ['warningIssues ' ] > 0 ) {
374367 $ this ->io ->newLine ();
375368 $ this ->io ->writeln (sprintf (
376369 '<fg=yellow>ℹ</> Found <fg=yellow;options=bold>%d warning(s)</> in %d scanned modules. ' ,
377370 $ summary ['warningIssues ' ],
378- $ summary ['total ' ]
371+ $ summary ['total ' ],
379372 ));
380373 $ this ->io ->writeln ('Review these modules for potential compatibility issues. ' );
381374 } else {
0 commit comments