php-dry icon indicating copy to clipboard operation
php-dry copied to clipboard

Running without options is not user friendly

Open LeoVie opened this issue 3 years ago • 1 comments

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)

LeoVie avatar Mar 31 '22 09:03 LeoVie

https://twitter.com/mmartin_joo/status/1513517977706106889

LeoVie avatar Apr 12 '22 07:04 LeoVie