Skip to content

Commit

Permalink
XMLFile: fix assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kockodev authored and h4kuna committed Nov 21, 2023
1 parent bfedc4c commit 79efa24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Account/FioAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace h4kuna\Fio\Account;

class FioAccount
use Stringable;

class FioAccount implements Stringable
{
private Bank $account;

Expand Down
3 changes: 2 additions & 1 deletion src/Pay/XMLFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace h4kuna\Fio\Pay;

use h4kuna\Fio\Exceptions\InvalidState;
use Stringable;
use XMLWriter;

class XMLFile
Expand Down Expand Up @@ -63,7 +64,7 @@ private function setBody(Payment\Property $data): self
$value = '';
}

assert(is_scalar($value));
assert(is_scalar($value) || $value instanceof Stringable);
$this->xml->startElement($node);
$this->xml->text(strval($value));
$this->xml->endElement();
Expand Down

0 comments on commit 79efa24

Please sign in to comment.