Skip to content

Commit

Permalink
Remove Decimal typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
rtheunissen authored Jul 5, 2019
1 parent ca6b19c commit fbc4137
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DecimalObjectCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ trait DecimalObjectCast
*
* @return \Decimal\Decimal
*/
protected function asDecimal(Decimal $value, $decimals)
protected function asDecimal($value, $decimals)
{
return $value->toFixed($decimals, false, PHP_ROUND_HALF_UP);
assert($value instanceof Decimal);

return $value->toFixed($decimals, $commas = false, PHP_ROUND_HALF_UP);
}
}

0 comments on commit fbc4137

Please sign in to comment.