Skip to content

Commit

Permalink
BREAKING Case with no charge (#99)
Browse files Browse the repository at this point in the history
When parsing a CAMT.054 file, setTotalChargesAndTaxAmount is only called when a "Chrgs" record exists. Therefore, getTotalChargesAndTaxAmount must allow to return NULL.

If you rely on this method, you must check for `NULL` value yourself.
  • Loading branch information
sdespont authored Feb 19, 2021
1 parent e4b4714 commit a89fc7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DTO/Charges.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Charges
*/
private $records = [];

public function getTotalChargesAndTaxAmount(): Money
public function getTotalChargesAndTaxAmount(): ?Money
{
return $this->totalChargesAndTaxAmount;
}
Expand Down

0 comments on commit a89fc7f

Please sign in to comment.