wp-cli / php-cli-tools

A collection of tools to help with PHP command line utilities
MIT License
673 stars 118 forks source link

fixing off-by-1 error in progress bar examples #128

Closed lf-jeremy closed 6 years ago

lf-jeremy commented 6 years ago

Fixes #127

Resolves off-by-1 error in test_notify function.

While changing the comparison operator fixes this issue, the need for a tick count parameter could be avoided altogether as described in this issue comment. Given the normal use case is to tick a number of times equal to the progress bar tick total, the passed progress bar object could be introspected if appropriately exposed.