php-dry
php-dry copied to clipboard
Running without options is not user friendly
When running php-dry without command line options, you get the following error message
TypeError {#5695
#message: "App\Command\DetectClonesCommand::getStringOption(): Return value must be of type string, null returned"
#code: 0
#file: "/var/www/src/Command/DetectClonesCommand.php"
#line: 185
trace: {
/var/www/src/Command/DetectClonesCommand.php:185 {
App\Command\DetectClonesCommand->getStringOption(InputInterface $input, string $name): string
›
› return $value;
› }
}
/var/www/src/Command/DetectClonesCommand.php:164 { …}
/var/www/src/Command/DetectClonesCommand.php:92 { …}
/var/www/vendor/symfony/console/Command/Command.php:291 { …}
/var/www/vendor/symfony/console/Application.php:989 { …}
/var/www/vendor/symfony/console/Application.php:299 { …}
/var/www/vendor/symfony/console/Application.php:171 { …}
/var/www/php-dry:59 { …}
}
}
That's not very user friendly. Users should get informed about possible options (e.g. output same output as when running with -h option)
https://twitter.com/mmartin_joo/status/1513517977706106889