From df30d0dbc1bc4daf18391461475e50350a1e8a6c Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 14 Dec 2023 06:27:07 +0200 Subject: [PATCH] add total pieces to debug --- cli/fix.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cli/fix.php b/cli/fix.php index 675a4a7..dd1f8e2 100644 --- a/cli/fix.php +++ b/cli/fix.php @@ -120,8 +120,9 @@ foreach ((array) $namespaces as $namespace) if (empty($piece->value)) { echo sprintf( - 'Piece %s value not found, creating...' . PHP_EOL, - $key + 'Piece %s/%s value not found, creating...' . PHP_EOL, + $key + 1, + $total ); } @@ -129,8 +130,9 @@ foreach ((array) $namespaces as $namespace) else if ($piece->value !== $value) { echo sprintf( - 'Piece %s value invalid (%s <> %s), rewriting...' . PHP_EOL, - $key, + 'Piece %s/%s value invalid (%s <> %s), rewriting...' . PHP_EOL, + $key + 1, + $total, md5( $piece->value ), @@ -144,8 +146,9 @@ foreach ((array) $namespaces as $namespace) else { echo sprintf( - 'Piece %s - OK' . PHP_EOL, - $key + 'Piece %s/%s - OK' . PHP_EOL, + $key + 1, + $total ); continue;