Skip to content

Multiple minor changes

Thomas Flori requested to merge github/fork/graste/master into master

Created by: graste

Hi,

I made some changes that may be of interest. The following things have been adjusted:

  • introduced new getHelpText() method and used it in showHelp() method to give people the freedom to enhance the help text before displaying them
    • made padding for help text configurable (default is still 25)
    • suppressed PHP warning when description is not given in showHelp() method (added test for that)
  • used multibyte safe PHP string methods
  • made private methods protected as that should be sufficient as visibilty
  • added phpunit.xml file with autoloading and warnings as exceptions (to get failing tests on PHP warnings) etc.
  • added cheap Makefile with some targets:
    • test: runs phpunit tests
    • install-composer: installs composer
    • install-dependencies: installs/updates all vendor libraries using composer
    • install-dev-dependencies: installs/updates all vendor libraries necessary for development
  • added require-dev section in composer.json with phpunit requirement
  • some whitespace changes (there were some mixed tabs and spaces in files)
  • added .gitignore file for vendor and build directories (composer.lock file as well as getopt-php is a library)
  • adjusted README:
    • included getOptions() method
    • added development section with information about make and composer

I'm not sure whether the multibyte safe method usage is necessary and am open to feedback. :-)

Hope you like it.

Kind regards,

Steffen Gransow

Merge request reports