@@ -42,8 +42,8 @@ class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwa
42
42
/**
43
43
* Construct new XmlEncoder and allow to change the root node element name.
44
44
*
45
- * @param int|null $loadOptions A bit field of LIBXML_* constants
46
- * @param array $ignoredNodeTypes An array of ignored XML node types, each one of the DOM Predefined XML_* Constants.
45
+ * @param int|null $loadOptions A bit field of LIBXML_* constants
46
+ * @param int[] $ignoredNodeTypes an array of ignored XML node types, each one of the DOM Predefined XML_* Constants
47
47
*/
48
48
public function __construct (string $ rootNodeName = 'response ' , int $ loadOptions = null , array $ ignoredNodeTypes = null )
49
49
{
@@ -108,7 +108,7 @@ public function decode($data, $format, array $context = array())
108
108
if (XML_DOCUMENT_TYPE_NODE === $ child ->nodeType ) {
109
109
throw new NotEncodableValueException ('Document types are not allowed. ' );
110
110
}
111
- if (!$ rootNode && !\in_array ($ child ->nodeType , $ this ->ignoredNodeTypes , TRUE )) {
111
+ if (!$ rootNode && !\in_array ($ child ->nodeType , $ this ->ignoredNodeTypes , true )) {
112
112
$ rootNode = $ child ;
113
113
}
114
114
}
@@ -319,7 +319,7 @@ private function parseXmlValue(\DOMNode $node, array $context = array())
319
319
$ value = array ();
320
320
321
321
foreach ($ node ->childNodes as $ subnode ) {
322
- if (\in_array ($ subnode ->nodeType , $ this ->ignoredNodeTypes , TRUE )) {
322
+ if (\in_array ($ subnode ->nodeType , $ this ->ignoredNodeTypes , true )) {
323
323
continue ;
324
324
}
325
325
0 commit comments