Closed schlessera closed 6 years ago
It's also worth noting that it'd be more DRY to introspect the total from the \cli\progress\Bar
object than to pass it to the test_notify
function as a parameter. The existing cli\Progress::total()
method returns the _total
property, but passes it through number_format
first. Unfortunately, a getter for the raw value may be easily confused with the existing total()
method, which formats the number.
The example code contains an off-by-one error in its
test_notify()
method: https://github.com/wp-cli/php-cli-tools/blob/master/examples/common.php#L20From the original report by @lf-jeremy: