From e095fa47ad6946b47e5267304563de570246e298 Mon Sep 17 00:00:00 2001 From: Michel Hunziker Date: Mon, 7 Apr 2014 10:16:50 +0200 Subject: [PATCH] Remove unused variables --- src/Reader/Feed/Atom.php | 1 - src/Reader/Feed/Rss.php | 2 -- src/Reader/Reader.php | 1 - src/Writer/AbstractFeed.php | 1 - src/Writer/Renderer/Entry/Atom.php | 2 -- 5 files changed, 7 deletions(-) diff --git a/src/Reader/Feed/Atom.php b/src/Reader/Feed/Atom.php index 02a8f624..251ad03c 100644 --- a/src/Reader/Feed/Atom.php +++ b/src/Reader/Feed/Atom.php @@ -383,7 +383,6 @@ protected function indexEntries() { if ($this->getType() == Reader\Reader::TYPE_ATOM_10 || $this->getType() == Reader\Reader::TYPE_ATOM_03) { - $entries = array(); $entries = $this->xpath->evaluate('//atom:entry'); foreach ($entries as $index => $entry) { diff --git a/src/Reader/Feed/Rss.php b/src/Reader/Feed/Rss.php index 0237a531..fc7baa13 100644 --- a/src/Reader/Feed/Rss.php +++ b/src/Reader/Feed/Rss.php @@ -675,8 +675,6 @@ public function getCategories() */ protected function indexEntries() { - $entries = array(); - if ($this->getType() !== Reader\Reader::TYPE_RSS_10 && $this->getType() !== Reader\Reader::TYPE_RSS_090) { $entries = $this->xpath->evaluate('//item'); } else { diff --git a/src/Reader/Reader.php b/src/Reader/Reader.php index 3205a04e..da515372 100644 --- a/src/Reader/Reader.php +++ b/src/Reader/Reader.php @@ -192,7 +192,6 @@ public static function import($uri, $etag = null, $lastModified = null) { $cache = self::getCache(); $feed = null; - $responseXml = ''; $client = self::getHttpClient(); $client->resetParameters(); $headers = new ZendHttp\Headers(); diff --git a/src/Writer/AbstractFeed.php b/src/Writer/AbstractFeed.php index b96a5302..5165904f 100644 --- a/src/Writer/AbstractFeed.php +++ b/src/Writer/AbstractFeed.php @@ -287,7 +287,6 @@ protected function _validateTagUri($id) { if (preg_match('/^tag:(?P.*),(?P\d{4}-?\d{0,2}-?\d{0,2}):(?P.*)(.*:)*$/', $id, $matches)) { $dvalid = false; - $nvalid = false; $date = $matches['date']; $d6 = strtotime($date); if ((strlen($date) == 4) && $date <= date('Y')) { diff --git a/src/Writer/Renderer/Entry/Atom.php b/src/Writer/Renderer/Entry/Atom.php index 28b325d4..c7fc4be2 100644 --- a/src/Writer/Renderer/Entry/Atom.php +++ b/src/Writer/Renderer/Entry/Atom.php @@ -291,7 +291,6 @@ protected function _validateTagUri($id) { if (preg_match('/^tag:(?P.*),(?P\d{4}-?\d{0,2}-?\d{0,2}):(?P.*)(.*:)*$/', $id, $matches)) { $dvalid = false; - $nvalid = false; $date = $matches['date']; $d6 = strtotime($date); if ((strlen($date) == 4) && $date <= date('Y')) { @@ -353,7 +352,6 @@ protected function _setContent(DOMDocument $dom, DOMElement $root) */ protected function _loadXhtml($content) { - $xhtml = ''; if (class_exists('tidy', false)) { $tidy = new \tidy; $config = array(