element instanceof \PhpOffice\PhpWord\Element\Footnote) { return ''; } /** @var \PhpOffice\PhpWord\Writer\HTML $parentWriter Type hint */ $parentWriter = $this->parentWriter; $noteID = count($parentWriter->getNotes()) + 1; $noteMark = $this->noteType . '-' . $this->element->getRelationID(); $content = "{$noteID}"; $parentWriter->addNote($noteID, $noteMark); return $content; } }