removing some unused code detected by codacy

This commit is contained in:
El RIDO 2016-07-04 20:46:45 +02:00
parent a856a50bc3
commit 5980f8b603
7 changed files with 3 additions and 19 deletions

View File

@ -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(

View File

@ -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()

View File

@ -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()

View File

@ -1,8 +1,6 @@
<?php
class requestTest extends PHPUnit_Framework_TestCase
{
private $_request;
public function setUp()
{
/* Setup Routine */

View File

@ -43,7 +43,7 @@ class serversaltTest extends PHPUnit_Framework_TestCase
function mcrypt_create_iv($int, $flag)
{
$randomSalt = '';
for($i = 0; $i < 256; ++$i) {
for($i = 0; $i < $int; ++$i) {
$randomSalt .= base_convert(mt_rand(), 10, 16);
}
// hex2bin requires an even length, pad if necessary

View File

@ -1,8 +1,6 @@
<?php
class vizhash16x16Test extends PHPUnit_Framework_TestCase
{
private $_dataDirCreated;
private $_file;
private $_path;

View File

@ -124,9 +124,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
@unlink($file);
}
ob_start();
new zerobin;
$content = ob_get_contents();
foreach ($dirs as $dir) {
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
$this->assertFileExists(