1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Ignore nullable return form SimpleXMLElement::addChild()

It seems unrealistic to require users to perform a null check every time
they call this method.
This commit is contained in:
Grégoire Paris 2023-05-04 21:07:44 +02:00
parent 7483f4d809
commit a6016e3072
No known key found for this signature in database
GPG Key ID: 24D48B8012B116BF

View File

@ -53,6 +53,7 @@ class SimpleXMLElement implements Traversable, Countable
final public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = '', bool $isPrefix = false) {}
/** @psalm-ignore-nullable-return */
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement {}
public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void {}