@@ -51,7 +51,7 @@ class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwa
51
51
const REMOVE_EMPTY_TAGS = 'remove_empty_tags ' ;
52
52
const ROOT_NODE_NAME = 'xml_root_node_name ' ;
53
53
const STANDALONE = 'xml_standalone ' ;
54
- const TYPE_CASE_ATTRIBUTES = 'xml_type_cast_attributes ' ;
54
+ const TYPE_CAST_ATTRIBUTES = 'xml_type_cast_attributes ' ;
55
55
const VERSION = 'xml_version ' ;
56
56
57
57
private $ defaultContext = [
@@ -61,7 +61,7 @@ class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwa
61
61
self ::LOAD_OPTIONS => LIBXML_NONET | LIBXML_NOBLANKS ,
62
62
self ::REMOVE_EMPTY_TAGS => false ,
63
63
self ::ROOT_NODE_NAME => 'response ' ,
64
- self ::TYPE_CASE_ATTRIBUTES => true ,
64
+ self ::TYPE_CAST_ATTRIBUTES => true ,
65
65
];
66
66
67
67
/**
@@ -293,7 +293,7 @@ private function parseXmlAttributes(\DOMNode $node, array $context = []): array
293
293
}
294
294
295
295
$ data = [];
296
- $ typeCastAttributes = (bool ) ($ context [self ::TYPE_CASE_ATTRIBUTES ] ?? $ this ->defaultContext [self ::TYPE_CASE_ATTRIBUTES ]);
296
+ $ typeCastAttributes = (bool ) ($ context [self ::TYPE_CAST_ATTRIBUTES ] ?? $ this ->defaultContext [self ::TYPE_CAST_ATTRIBUTES ]);
297
297
298
298
foreach ($ node ->attributes as $ attr ) {
299
299
if (!is_numeric ($ attr ->nodeValue ) || !$ typeCastAttributes || (isset ($ attr ->nodeValue [1 ]) && '0 ' === $ attr ->nodeValue [0 ])) {
0 commit comments