Skip to content

Commit

Permalink
Document new helper
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 4, 2023
1 parent fba6189 commit b984e12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ echo Number::format(1234567.89); // 1 KB

// Get a human-readable representation of a number
echo Number::format(1234567.89); // 1 million

// Get the abbreviated form of a number
echo Number::format(1234567.89); // 1M
```

### Advanced usage
Expand Down
6 changes: 3 additions & 3 deletions src/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function fileSize(int|float $bytes, int $precision = 0, ?int $maxP
}

/**
* Convert the number to its human-readable equivalent.
* Convert the number to its human-readable equivalent with abbreviated units.
*
* @param int|float $number
* @param int $precision
Expand All @@ -133,7 +133,7 @@ public static function abbreviate(int|float $number, int $precision = 0, ?int $m
}

/**
* Convert the number to its human readable equivalent.
* Convert the number to its human-readable equivalent.
*
* @param int $number
* @param int $precision
Expand All @@ -158,7 +158,7 @@ public static function forHumans(int|float $number, int $precision = 0, ?int $ma
}

/**
* Convert the number to its human readable equivalent.
* Convert the number to its human-readable equivalent.
*
* @param int $number
* @param int $precision
Expand Down

0 comments on commit b984e12

Please sign in to comment.