removing some unused code detected by codacy
This commit is contained in:
parent
a856a50bc3
commit
5980f8b603
7 changed files with 3 additions and 19 deletions
|
@ -55,14 +55,6 @@ class zerobin
|
||||||
*/
|
*/
|
||||||
private $_doesExpire = false;
|
private $_doesExpire = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* formatter
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $_formatter = 'plaintext';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* error message
|
* error message
|
||||||
*
|
*
|
||||||
|
@ -219,8 +211,6 @@ class zerobin
|
||||||
*/
|
*/
|
||||||
private function _create()
|
private function _create()
|
||||||
{
|
{
|
||||||
$error = false;
|
|
||||||
|
|
||||||
// Ensure last paste from visitors IP address was more than configured amount of seconds ago.
|
// Ensure last paste from visitors IP address was more than configured amount of seconds ago.
|
||||||
trafficlimiter::setConfiguration($this->_conf);
|
trafficlimiter::setConfiguration($this->_conf);
|
||||||
if (!trafficlimiter::canPass()) return $this->_return_message(
|
if (!trafficlimiter::canPass()) return $this->_return_message(
|
||||||
|
|
|
@ -90,7 +90,7 @@ class configurationTest extends PHPUnit_Framework_TestCase
|
||||||
public function testHandleBlankConfigFile()
|
public function testHandleBlankConfigFile()
|
||||||
{
|
{
|
||||||
file_put_contents(CONF, '');
|
file_put_contents(CONF, '');
|
||||||
$conf = new configuration;
|
new configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHandleMinimalConfigFile()
|
public function testHandleMinimalConfigFile()
|
||||||
|
|
|
@ -175,7 +175,7 @@ class modelTest extends PHPUnit_Framework_TestCase
|
||||||
public function testInvalidComment()
|
public function testInvalidComment()
|
||||||
{
|
{
|
||||||
$paste = $this->_model->getPaste();
|
$paste = $this->_model->getPaste();
|
||||||
$comment = $paste->getComment(helper::getPasteId());
|
$paste->getComment(helper::getPasteId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExpiration()
|
public function testExpiration()
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
class requestTest extends PHPUnit_Framework_TestCase
|
class requestTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $_request;
|
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
/* Setup Routine */
|
/* Setup Routine */
|
||||||
|
|
|
@ -43,7 +43,7 @@ class serversaltTest extends PHPUnit_Framework_TestCase
|
||||||
function mcrypt_create_iv($int, $flag)
|
function mcrypt_create_iv($int, $flag)
|
||||||
{
|
{
|
||||||
$randomSalt = '';
|
$randomSalt = '';
|
||||||
for($i = 0; $i < 256; ++$i) {
|
for($i = 0; $i < $int; ++$i) {
|
||||||
$randomSalt .= base_convert(mt_rand(), 10, 16);
|
$randomSalt .= base_convert(mt_rand(), 10, 16);
|
||||||
}
|
}
|
||||||
// hex2bin requires an even length, pad if necessary
|
// hex2bin requires an even length, pad if necessary
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
class vizhash16x16Test extends PHPUnit_Framework_TestCase
|
class vizhash16x16Test extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $_dataDirCreated;
|
|
||||||
|
|
||||||
private $_file;
|
private $_file;
|
||||||
|
|
||||||
private $_path;
|
private $_path;
|
||||||
|
|
|
@ -124,9 +124,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
|
||||||
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
||||||
@unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
ob_start();
|
|
||||||
new zerobin;
|
new zerobin;
|
||||||
$content = ob_get_contents();
|
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
$file = PATH . $dir . DIRECTORY_SEPARATOR . '.htaccess';
|
||||||
$this->assertFileExists(
|
$this->assertFileExists(
|
||||||
|
|
Loading…
Reference in a new issue