mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 02:21:55 -04:00
Code style tweaks to satisfy PHPStan
This commit is contained in:
parent
658db66c2b
commit
5c4617d759
6 changed files with 19 additions and 6 deletions
|
@ -209,7 +209,7 @@ class Ebook{
|
|||
$this->TocEntries = [];
|
||||
$tocDom = new SimpleXMLElement(str_replace('xmlns=', 'ns=', file_get_contents($wwwFilesystemPath . '/toc.xhtml') ?: ''));
|
||||
$tocDom->registerXPathNamespace('epub', 'http://www.idpf.org/2007/ops');
|
||||
foreach($tocDom->xpath('/html/body//nav[@epub:type="toc"]//a[not(contains(@epub:type, "z3998:roman")) and not(text() = "Titlepage" or text() = "Imprint" or text() = "Colophon" or text() = "Endnotes" or text() = "Uncopyright") and not(contains(@href, "halftitle"))]') as $item){
|
||||
foreach($tocDom->xpath('/html/body//nav[@epub:type="toc"]//a[not(contains(@epub:type, "z3998:roman")) and not(text() = "Titlepage" or text() = "Imprint" or text() = "Colophon" or text() = "Endnotes" or text() = "Uncopyright") and not(contains(@href, "halftitle"))]') ?: [] as $item){
|
||||
$this->TocEntries[] = (string)$item;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue