Fixed some psalm issues.

This commit is contained in:
Jan Böhmer 2020-03-29 23:13:25 +02:00
parent eb9b24d5d7
commit cb0aa7bc7a
32 changed files with 217 additions and 148 deletions

View file

@ -60,7 +60,10 @@ class AmountFormatter
}
/**
* Formats the given value using the measurement unit and options.
* Formats the given value using the measurement unit and options.
*
* @param MeasurementUnit|null $unit The measurement unit, whose unit symbol should be used for formatting.
* If set to null, it is assumed that the part amount is measured in pieces.
*
* @param MeasurementUnit|null $unit The measurement unit, whose unit symbol should be used for formatting.
* If set to null, it is assumed that the part amount is measured in pieces.
@ -69,7 +72,7 @@ class AmountFormatter
*
* @throws InvalidArgumentException thrown if $value is not numeric
*/
public function format($value, ?MeasurementUnit $unit = null, array $options = [])
public function format(float $value, ?MeasurementUnit $unit = null, array $options = [])
{
if (! is_numeric($value)) {
throw new InvalidArgumentException('$value must be an numeric value!');