mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 03:14:32 +02:00
Fixed code style.
This commit is contained in:
parent
2853e471c4
commit
d0b1024d80
212 changed files with 495 additions and 1005 deletions
|
@ -72,7 +72,7 @@ class AmountFormatter
|
|||
*/
|
||||
public function format($value, ?MeasurementUnit $unit = null, array $options = [])
|
||||
{
|
||||
if (! is_numeric($value)) {
|
||||
if (!is_numeric($value)) {
|
||||
throw new InvalidArgumentException('$value must be an numeric value!');
|
||||
}
|
||||
$value = (float) $value;
|
||||
|
@ -94,7 +94,7 @@ class AmountFormatter
|
|||
}
|
||||
|
||||
//Otherwise just output it
|
||||
if (! empty($options['unit'])) {
|
||||
if (!empty($options['unit'])) {
|
||||
$format_string = '%.'.$options['decimals'].'f '.$options['unit'];
|
||||
} else { //Dont add space after number if no unit was specified
|
||||
$format_string = '%.'.$options['decimals'].'f';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue