Skip to content

Commit 7ce2e54

Browse files
committed
First parameter of SimpleXMLElement::children() accepts null
1 parent 8f28721 commit 7ce2e54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/functionMap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10232,7 +10232,7 @@
1023210232
'SimpleXMLElement::addChild' => ['SimpleXMLElement', 'name'=>'string', 'value='=>'string', 'ns='=>'string'],
1023310233
'SimpleXMLElement::asXML' => ['string|bool', 'filename='=>'string'],
1023410234
'SimpleXMLElement::attributes' => ['SimpleXMLElement|null', 'ns='=>'string', 'is_prefix='=>'bool'],
10235-
'SimpleXMLElement::children' => ['SimpleXMLElement', 'ns='=>'string', 'is_prefix='=>'bool'],
10235+
'SimpleXMLElement::children' => ['SimpleXMLElement', 'ns='=>'string|null', 'is_prefix='=>'bool'],
1023610236
'SimpleXMLElement::count' => ['int'],
1023710237
'SimpleXMLElement::getDocNamespaces' => ['string[]', 'recursive='=>'bool', 'from_root='=>'bool'],
1023810238
'SimpleXMLElement::getName' => ['string'],

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function testCallMethods(): void
388388
921,
389389
],
390390
[
391-
'Parameter #1 $ns of method SimpleXMLElement::children() expects string, int given.',
391+
'Parameter #1 $ns of method SimpleXMLElement::children() expects string|null, int given.',
392392
942,
393393
],
394394
[

0 commit comments

Comments
 (0)