removing some unused code detected by codacy
This commit is contained in:
parent
a856a50bc3
commit
5980f8b603
@ -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(
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
class requestTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $_request;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
/* Setup Routine */
|
||||
|
@ -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
|
||||
|
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
class vizhash16x16Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $_dataDirCreated;
|
||||
|
||||
private $_file;
|
||||
|
||||
private $_path;
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user