* @param string $idPrefix prefix for all generated ids, must not end with a delimiter
* @return string the HTML of the generated table of contents or an empty string if there are too few headings
*/
- public static function forMessage(\DOMDocument $document, string $idPrefix) {
+ public static function forMessage(\DOMDocument $document, $idPrefix) {
$titleRegex = new Regex('[^\p{L}\p{N}]+', Regex::UTF_8);
// fetch all headings in their order of appearance
/** @var HtmlTocItem */
private $parent;
- public function __construct(int $level, string $id, string $title) {
+ public function __construct($level, $id, $title) {
$this->level = $level;
$this->id = $id;
$this->title = $title;
$child->setParent($this);
}
- public function setDepth(int $depth) {
+ public function setDepth($depth) {
$this->depth = $depth;
}