LeoVie / php-dry

Clone Detection for PHP
BSD 3-Clause "New" or "Revised" License
14 stars 0 forks source link

Running without options is not user friendly #42

Open LeoVie opened 2 years ago

LeoVie commented 2 years ago

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 commented 2 years ago

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