Skip to content

Commit

Permalink
corrected getIBAN and getBIC
Browse files Browse the repository at this point in the history
trim() expects string, null given
  • Loading branch information
twitnic authored May 27, 2020
1 parent 50f55a0 commit 9e06d67
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Jejik/MT940/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,10 @@ public function setEref(string $eref = null): TransactionInterface
/**
* Get BIC for this transaction
*/
public function getBIC(): string
public function getBIC(): ?string
{
return trim($this->bic);
return ($this->bic !== null) ? trim($this->bic) : null;

}

/**
Expand All @@ -370,9 +371,9 @@ public function setBIC(string $bic = null): TransactionInterface
/**
* Get IBAN for this transaction
*/
public function getIBAN(): string
public function getIBAN(): ?string
{
return trim($this->iban);
return ($this->iban !== null) ? trim($this->iban) : null;
}

/**
Expand Down

0 comments on commit 9e06d67

Please sign in to comment.