You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
957 B

<?php
// SPDX-FileCopyrightText: 2022 Ondřej Mirtes
// SPDX-License-Identifier: MIT
// Based on https://github.com/phpstan/phpstan-src/blob/b2a9ba4b82d19b01f37eb983746f1840f1213851/stubs/dom.stub
use Readability\JSLikeHTMLElement;
class DOMDocument
{
/** @var JSLikeHTMLElement|null */
public $documentElement;
/**
* @param string $name
* @return DOMNodeList<JSLikeHTMLElement>
*/
public function getElementsByTagName($name) {}
/**
* @param string $localName
* @param string $value
* @return JSLikeHTMLElement Officially, this can return false but PHPStan decided to ignore that: <https://github.com/phpstan/phpstan-src/pull/1569>
*/
public function createElement($localName, $value = '') {}
}
class DOMNode
{
}
class DOMElement extends DOMNode
{
/**
* @param string $name
* @return DOMNodeList<JSLikeHTMLElement>
*/
public function getElementsByTagName($name) {}
}