File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace h4kuna \Fio \Account ;
4
4
5
- class FioAccount
5
+ use Stringable ;
6
+
7
+ class FioAccount implements Stringable
6
8
{
7
9
private Bank $ account ;
8
10
@@ -31,7 +33,7 @@ public function getToken(): string
31
33
}
32
34
33
35
34
- public function __toString ()
36
+ public function __toString (): string
35
37
{
36
38
return $ this ->getAccount ();
37
39
}
Original file line number Diff line number Diff line change 3
3
namespace h4kuna \Fio \Pay ;
4
4
5
5
use h4kuna \Fio \Exceptions \InvalidState ;
6
+ use Stringable ;
6
7
use XMLWriter ;
7
8
8
9
class XMLFile
@@ -63,9 +64,9 @@ private function setBody(Payment\Property $data): self
63
64
$ value = '' ;
64
65
}
65
66
66
- assert (is_scalar ($ value ));
67
+ assert (is_scalar ($ value ) || $ value instanceof Stringable );
67
68
$ this ->xml ->startElement ($ node );
68
- $ this ->xml ->text (strval ( $ value) );
69
+ $ this ->xml ->text (( string ) $ value );
69
70
$ this ->xml ->endElement ();
70
71
}
71
72
$ this ->xml ->endElement ();
You can’t perform that action at this time.
0 commit comments