Skip to content

Commit

Permalink
Allocation requires an array as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch authored Nov 20, 2016
1 parent a95606d commit 8814a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/features/allocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ is to keep handing out the remainder until all money is spent. In other words:
use Money\Money;
$profit = Money::EUR(5);
list($my_cut, $investors_cut) = $profit->allocate(70, 30);
list($my_cut, $investors_cut) = $profit->allocate([70, 30]);
// $my_cut is 4 cents, $investors_cut is 1 cent
// The order is important:
list($investors_cut, $my_cut) = $profit->allocate(30, 70);
list($investors_cut, $my_cut) = $profit->allocate([30, 70]);
// $my_cut is 3 cents, $investors_cut is 2 cents
Expand Down

0 comments on commit 8814a6e

Please sign in to comment.