diff --git a/phpdotnet/phd/Format.php b/phpdotnet/phd/Format.php index fbd240d8f..7654e6b5e 100644 --- a/phpdotnet/phd/Format.php +++ b/phpdotnet/phd/Format.php @@ -357,7 +357,6 @@ public function getFormatName() { /* Buffer where append data instead of the standard stream (see format's appendData()) */ final public function parse($xml) { - $parsed = ""; $reader = new Reader(); $render = new Render(); @@ -509,7 +508,7 @@ public function initRow() { } public function getEntryOffset(array $attrs) { $curr = $this->TABLE["next_colnum"]; - foreach($this->TABLE["colspec"] as $col => $spec) { + foreach($this->TABLE["colspec"] as $spec) { if ($spec["colname"] == $attrs["colname"]) { $colnum = $spec["colnum"]; $this->TABLE["next_colnum"] += $colnum-$curr; @@ -520,7 +519,7 @@ public function getEntryOffset(array $attrs) { } public function colspan(array $attrs) { if (isset($attrs["namest"])) { - foreach($this->TABLE["colspec"] as $colnum => $spec) { + foreach($this->TABLE["colspec"] as $spec) { if ($spec["colname"] == $attrs["namest"]) { $from = $spec["colnum"]; continue; diff --git a/phpdotnet/phd/Format/Abstract/PDF.php b/phpdotnet/phd/Format/Abstract/PDF.php index 5aea11f6b..ed34c4c09 100644 --- a/phpdotnet/phd/Format/Abstract/PDF.php +++ b/phpdotnet/phd/Format/Abstract/PDF.php @@ -94,7 +94,6 @@ class PdfWriter { private $currentFontColor; private $fonts; private $oldFonts = array(); - private $text; private $vOffset = 0; private $hOffset = 0; diff --git a/phpdotnet/phd/Highlighter.php b/phpdotnet/phd/Highlighter.php index b905e568c..f839d8690 100644 --- a/phpdotnet/phd/Highlighter.php +++ b/phpdotnet/phd/Highlighter.php @@ -76,8 +76,6 @@ public function highlight($text, $role, $format) . htmlspecialchars($text, ENT_QUOTES, 'UTF-8') . "\n"; } - - return $retval; }//public function highlight(..) } diff --git a/phpdotnet/phd/Index.php b/phpdotnet/phd/Index.php index c07cbe36d..0a97ebf94 100644 --- a/phpdotnet/phd/Index.php +++ b/phpdotnet/phd/Index.php @@ -213,7 +213,7 @@ public function update($event, $value = null) } break; case Render::FINALIZE: - $retval = $this->db->exec("BEGIN TRANSACTION; INSERT INTO indexing (time) VALUES ('" . time() . "'); COMMIT"); + $this->db->exec("BEGIN TRANSACTION; INSERT INTO indexing (time) VALUES ('" . time() . "'); COMMIT"); $this->commit(); if ($this->db->lastErrorCode()) { trigger_error($this->db->lastErrorMsg(), E_USER_WARNING); @@ -361,7 +361,7 @@ public function format_chunk($open, $name, $attrs, $props) { return false; } if (array_pop($this->isChunk)) { - $lastchunk = array_pop($this->chunks); + array_pop($this->chunks); $this->currentchunk = end($this->chunks); $this->appendID(); } diff --git a/phpdotnet/phd/Options/Handler.php b/phpdotnet/phd/Options/Handler.php index df3c7c2e3..323958ecb 100644 --- a/phpdotnet/phd/Options/Handler.php +++ b/phpdotnet/phd/Options/Handler.php @@ -170,7 +170,7 @@ public function option_p($k, $v) public function option_partial($k, $v) { $render_ids = Config::render_ids(); - foreach((array)$v as $i => $val) { + foreach((array)$v as $val) { $recursive = true; if (strpos($val, "=") !== false) { list($val, $recursive) = explode("=", $val); @@ -215,7 +215,7 @@ public function option_s($k, $v) public function option_skip($k, $v) { $skip_ids = Config::skip_ids(); - foreach((array)$v as $i => $val) { + foreach((array)$v as $val) { $recursive = true; if (strpos($val, "=") !== false) { list($val, $recursive) = explode("=", $val); @@ -261,7 +261,7 @@ public function option_verbose($k, $v) { static $verbose = 0; - foreach((array)$v as $i => $val) { + foreach((array)$v as $val) { foreach(explode("|", $val) as $const) { if (defined($const)) { $verbose |= (int)constant($const); diff --git a/phpdotnet/phd/Options/Parser.php b/phpdotnet/phd/Options/Parser.php index 206b509f8..6d9e8e9f4 100644 --- a/phpdotnet/phd/Options/Parser.php +++ b/phpdotnet/phd/Options/Parser.php @@ -81,7 +81,7 @@ private function checkOptions() { $checkArgv = explode('=', $argv[$i]); if (substr($checkArgv[0], 0, 2) == '--') { if (!in_array(substr($checkArgv[0], 2), $long)) { - trigger_error('Invalid long option ' . $argv[$i] . ' ' . $check, E_USER_ERROR); + trigger_error('Invalid long option ' . $argv[$i], E_USER_ERROR); } } elseif (substr($checkArgv[0], 0, 1) == '-') { if (!in_array(substr($checkArgv[0], 1), $short)) { diff --git a/phpdotnet/phd/Package/Generic/Manpage.php b/phpdotnet/phd/Package/Generic/Manpage.php index 329a2789c..8d819dd3c 100644 --- a/phpdotnet/phd/Package/Generic/Manpage.php +++ b/phpdotnet/phd/Package/Generic/Manpage.php @@ -448,14 +448,7 @@ public function format_refname($open, $name, $attrs, $props) { return ""; } - /* - public function format_refname($open, $name, $attrs, $props) { - if ($open) { - return "\n.SH " . $this->autogen($name, $props["lang"]) . "\n"; - } - return ""; - } - */ + public function format_refname_text($value, $tag) { $this->cchunk["funcname"][] = $this->toValidName(trim($value)); diff --git a/phpdotnet/phd/Package/Generic/PDF.php b/phpdotnet/phd/Package/Generic/PDF.php index bfa19c560..aca83b2ba 100644 --- a/phpdotnet/phd/Package/Generic/PDF.php +++ b/phpdotnet/phd/Package/Generic/PDF.php @@ -770,7 +770,6 @@ public function format_entry($open, $name, $attrs, $props) { if ($open) { $dbattrs = Format::getColspec($attrs[Reader::XMLNS_DOCBOOK]); $align = (isset($dbattrs["align"]) ? $dbattrs["align"] : $align); - $retval = ""; if (isset($dbattrs["colname"])) { for($i=Format::getEntryOffset($dbattrs); $i>0; --$i) { $this->pdfDoc->add(PdfWriter::TABLE_ENTRY, array(1, 1, $align)); @@ -982,7 +981,6 @@ public function format_initializer($open, $name, $attrs) { public function format_footnoteref($open, $name, $attrs, $props) { if ($open) { $linkend = $attrs[Reader::XMLNS_DOCBOOK]["linkend"]; - $found = false; foreach($this->cchunk["footnote"] as $k => $note) { if ($note["id"] === $linkend) { $this->pdfDoc->setFont(PdfWriter::FONT_NORMAL, 12, array(0,0,1)); diff --git a/phpdotnet/phd/Package/Generic/XHTML.php b/phpdotnet/phd/Package/Generic/XHTML.php index 7606cb214..8d1a9a594 100644 --- a/phpdotnet/phd/Package/Generic/XHTML.php +++ b/phpdotnet/phd/Package/Generic/XHTML.php @@ -610,7 +610,6 @@ public function format_suppressed_text($value, $tag) { } public function format_link($open, $name, $attrs, $props) { - $link = null; if ($open) { $link = $class = $content = ""; @@ -793,7 +792,6 @@ public function format_container_chunk_below($open, $name, $attrs, $props) { } $toc = '