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 = '
    '; - $desc = ""; if (!in_array($id, $this->TOC_WRITTEN)) { $toc = $this->createTOC($id, $name, $props); } @@ -1141,7 +1139,6 @@ public function format_fieldsynopsis_varname($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) { return '[' .($k + 1). ']'; diff --git a/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php b/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php index 82fba7c6a..6fce41bcf 100755 --- a/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php +++ b/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php @@ -100,7 +100,6 @@ public function update($event, $val = null) { */ public function header($id) { $title = $this->getShortDescription($id); - $lang = Config::language(); static $cssLinks = null; if ($cssLinks === null) { $cssLinks = $this->createCSSLinks(); diff --git a/phpdotnet/phd/Package/PEAR/Web.php b/phpdotnet/phd/Package/PEAR/Web.php index 8f048daa5..43824791d 100755 --- a/phpdotnet/phd/Package/PEAR/Web.php +++ b/phpdotnet/phd/Package/PEAR/Web.php @@ -124,11 +124,8 @@ public function header($id) */ public function footer($id) { - $ext = $this->ext; - $parent = Format::getParent($id); - return 'getFilename($id) . $ext . '", ' + . $this->getFilename($id) . $this->ext . '", ' . var_export(Format::getLongDescription($id), true) . '); ?>'; } diff --git a/phpdotnet/phd/Package/PEAR/XHTML.php b/phpdotnet/phd/Package/PEAR/XHTML.php index 081aabe8d..37a552974 100755 --- a/phpdotnet/phd/Package/PEAR/XHTML.php +++ b/phpdotnet/phd/Package/PEAR/XHTML.php @@ -646,7 +646,7 @@ public function format_phd_pearapi($open, $name, $attrs, $props) if (count($arLinkend) == 1) { //link to class $linktpl = '{$package}/docs/latest/{$package}/{$class}.html'; - } else if ($arLinkend[1]{0} == '$') { + } else if ($arLinkend[1][0] == '$') { //link to class variable $variable = $arLinkend[1]; $linktpl = '{$package}/docs/latest/{$package}/{$class}.html#var{$variable}'; diff --git a/phpdotnet/phd/Package/PHP/ChunkedXHTML.php b/phpdotnet/phd/Package/PHP/ChunkedXHTML.php index a04d83d12..9afc97f70 100644 --- a/phpdotnet/phd/Package/PHP/ChunkedXHTML.php +++ b/phpdotnet/phd/Package/PHP/ChunkedXHTML.php @@ -2,8 +2,6 @@ namespace phpdotnet\phd; class Package_PHP_ChunkedXHTML extends Package_PHP_Web { - private $nav = ""; - public function __construct() { parent::__construct(); $this->registerFormatName("PHP-Chunked-XHTML"); diff --git a/phpdotnet/phd/Package/PHP/HowTo.php b/phpdotnet/phd/Package/PHP/HowTo.php index 4648d9492..cd060aa51 100644 --- a/phpdotnet/phd/Package/PHP/HowTo.php +++ b/phpdotnet/phd/Package/PHP/HowTo.php @@ -40,7 +40,6 @@ public function header($id) { $parent = Format::getParent($id); $next = $prev = $up = array(null, null); if ($parent && $parent != "ROOT") { - $siblings = Format::getChildren($parent); if ($nextId = Format::getNext($id)) { $next = array( Format::getFilename($nextId) . $this->getExt(), diff --git a/phpdotnet/phd/Package/PHP/KDevelop.php b/phpdotnet/phd/Package/PHP/KDevelop.php index 7812cbf82..e30e747f6 100644 --- a/phpdotnet/phd/Package/PHP/KDevelop.php +++ b/phpdotnet/phd/Package/PHP/KDevelop.php @@ -139,7 +139,6 @@ public function format_tocsect1($open, $name, $attrs) { public function format_tocsect2($open, $name, $attrs) { if (!isset($attrs[Reader::XMLNS_XML]["id"])) return ""; $id = $attrs[Reader::XMLNS_XML]["id"]; - $hasChild = (count(Format::getChildren($id)) > 0); if ($open) { $name = htmlspecialchars(Format::getShortDescription($id), ENT_QUOTES, 'UTF-8'); $url = (Format::getFilename($id) ? Format::getFilename($id) : $id) . $this->getExt(); diff --git a/phpdotnet/phd/Package/PHP/PDF.php b/phpdotnet/phd/Package/PHP/PDF.php index 9aab2742f..f0ee5e8d4 100644 --- a/phpdotnet/phd/Package/PHP/PDF.php +++ b/phpdotnet/phd/Package/PHP/PDF.php @@ -256,7 +256,7 @@ protected function resolveLinks($name) { public function format_type_text($type, $tagname) { $type = trim(preg_replace('/[ \n\t]+/', ' ', $type)); $t = strtolower($type); - $href = $fragment = ""; + $href = ""; switch($t) { case "bool": @@ -284,7 +284,6 @@ public function format_type_text($type, $tagname) { break; case "mixed": $href = "language.types.declarations"; - $fragment = "language.types.declarations.$t"; break; default: /* Check if its a classname. */ diff --git a/phpdotnet/phd/Package/PHP/XHTML.php b/phpdotnet/phd/Package/PHP/XHTML.php index 461475605..641c1dedd 100644 --- a/phpdotnet/phd/Package/PHP/XHTML.php +++ b/phpdotnet/phd/Package/PHP/XHTML.php @@ -289,6 +289,7 @@ public static function generateAcronymInfo($filename) { } $acronyms = array(); + $k = ""; while ($r->read()) { if ($r->nodeType != \XMLReader::ELEMENT) { continue; diff --git a/phpdotnet/phd/Reader/Partial.php b/phpdotnet/phd/Reader/Partial.php index 0c8cda3f2..8fee959ab 100644 --- a/phpdotnet/phd/Reader/Partial.php +++ b/phpdotnet/phd/Reader/Partial.php @@ -55,7 +55,6 @@ public function read() { static $currently_skipping = false; static $arrayPartial = array(); static $arraySkip = array(); - $ignore = false; while($ret = parent::read()) { $id = $this->getAttributeNs("id", self::XMLNS_XML); @@ -83,13 +82,11 @@ public function read() { unset($this->skip[$id]); $currently_skipping = false; - $ignore = false; array_pop($arraySkip); } else { v("Skipping %s...", $id, VERBOSE_PARTIAL_READING); $currently_skipping = $id; - $ignore = true; $arraySkip[] = $id; } } elseif ($currently_skipping && $this->skip[$currently_skipping]) { @@ -99,7 +96,6 @@ public function read() { v("%s done", $id, VERBOSE_PARTIAL_CHILD_READING); } - $ignore = true; } elseif ($currently_reading && $this->partial[$currently_reading]) { if ($currentPartial == $id) { v("Rendering child of %s, %s", $currently_reading, $id, VERBOSE_PARTIAL_CHILD_READING); @@ -120,7 +116,6 @@ public function read() { parent::next(); } } - $ignore = true; } } return $ret;