Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Apr 3, 2021
1 parent ff09eef commit f5a372d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ public function allocateWithRemainder(int ...$ratios) : array
$remainder = $remainder->minus($money);
$monies[] = $money;
}

$monies[] = $remainder;

return $monies;
Expand Down Expand Up @@ -638,17 +638,17 @@ public function split(int $parts) : array
}

/**
* Splits this Money into a number of parts and it's respective remainder.
*
* Splits this Money into a number of parts and a remainder.
*
* For example, given a `USD 100.00` money in the default context,
* `splitWithRemainder(3)` returns [`USD 33.33`, `USD 33.33`, `USD 33.33`, `USD 0.01`]
*
*
* The resulting monies have the same context as this Money.
*
*
* @param int $parts The number of parts
*
*
* @return Money[]
*
*
* @throws \InvalidArgumentException If called with invalid parameters.
*/
public function splitWithRemainder(int $parts) : array
Expand Down

0 comments on commit f5a372d

Please sign in to comment.