Skip to content

Commit a6016e3

Browse files
committed
Ignore nullable return form SimpleXMLElement::addChild()
It seems unrealistic to require users to perform a null check every time they call this method.
1 parent 7483f4d commit a6016e3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

stubs/extensions/simplexml.phpstub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class SimpleXMLElement implements Traversable, Countable
5353

5454
final public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = '', bool $isPrefix = false) {}
5555

56+
/** @psalm-ignore-nullable-return */
5657
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement {}
5758

5859
public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void {}

0 commit comments

Comments
 (0)