Skip to content

Commit

Permalink
Rename printNumber to printIndex and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pdenert committed Nov 5, 2024
1 parent 33174dd commit f9734d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/patrol_log/lib/src/step_entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ class StepEntry extends Entry {

@override
String pretty({int? number}) {
return '$indentation${status.name} ${printNumber(number)} $action';
return '$indentation${status.name} ${printIndex(number)} $action';
}

String printNumber(int? number) {
/// Returns the index of the step with the correct number of spaces,
/// to format the output.
String printIndex(int? number) {
if (number != null) {
if (number < 10) {
return ' $number.';
Expand Down

0 comments on commit f9734d9

Please sign in to comment.