From 5980f8b603cd9f442ab40663e96c45d9ecac73e9 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 4 Jul 2016 20:46:45 +0200 Subject: [PATCH] removing some unused code detected by codacy --- lib/zerobin.php | 10 ---------- tst/configuration.php | 2 +- tst/model.php | 2 +- tst/request.php | 2 -- tst/serversalt.php | 2 +- tst/vizhash16x16.php | 2 -- tst/zerobin.php | 2 -- 7 files changed, 3 insertions(+), 19 deletions(-) diff --git a/lib/zerobin.php b/lib/zerobin.php index b279dd2..94026de 100644 --- a/lib/zerobin.php +++ b/lib/zerobin.php @@ -55,14 +55,6 @@ class zerobin */ private $_doesExpire = false; - /** - * formatter - * - * @access private - * @var string - */ - private $_formatter = 'plaintext'; - /** * error message * @@ -219,8 +211,6 @@ class zerobin */ private function _create() { - $error = false; - // Ensure last paste from visitors IP address was more than configured amount of seconds ago. trafficlimiter::setConfiguration($this->_conf); if (!trafficlimiter::canPass()) return $this->_return_message( diff --git a/tst/configuration.php b/tst/configuration.php index d0fe5d3..b9084cd 100644 --- a/tst/configuration.php +++ b/tst/configuration.php @@ -90,7 +90,7 @@ class configurationTest extends PHPUnit_Framework_TestCase public function testHandleBlankConfigFile() { file_put_contents(CONF, ''); - $conf = new configuration; + new configuration; } public function testHandleMinimalConfigFile() diff --git a/tst/model.php b/tst/model.php index c5c21c1..6bc8332 100644 --- a/tst/model.php +++ b/tst/model.php @@ -175,7 +175,7 @@ class modelTest extends PHPUnit_Framework_TestCase public function testInvalidComment() { $paste = $this->_model->getPaste(); - $comment = $paste->getComment(helper::getPasteId()); + $paste->getComment(helper::getPasteId()); } public function testExpiration() diff --git a/tst/request.php b/tst/request.php index cf4a4eb..a072a5b 100644 --- a/tst/request.php +++ b/tst/request.php @@ -1,8 +1,6 @@ assertFileExists(