Skip to content

Commit

Permalink
Merge pull request moneyphp#596 from open-source-contributions/enhanc…
Browse files Browse the repository at this point in the history
…e_sample_code

Using short array syntax instead
sagikazarmark authored Feb 24, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents cc39823 + 720fa3c commit 6e0eb04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ use Money\Money;
$fiveEur = Money::EUR(500);
$tenEur = $fiveEur->add($fiveEur);

list($part1, $part2, $part3) = $tenEur->allocate(array(1, 1, 1));
list($part1, $part2, $part3) = $tenEur->allocate([1, 1, 1]);
assert($part1->equals(Money::EUR(334)));
assert($part2->equals(Money::EUR(333)));
assert($part3->equals(Money::EUR(333)));

0 comments on commit 6e0eb04

Please sign in to comment.