Convert to PSR-2 coding style (using phpcs-fixer)
This commit is contained in:
@@ -35,7 +35,9 @@ abstract class AbstractData
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function __construct() {}
|
||||
protected function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* enforce singleton, disable cloning
|
||||
@@ -44,7 +46,9 @@ abstract class AbstractData
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function __clone() {}
|
||||
private function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* get instance of singleton
|
||||
@@ -54,7 +58,9 @@ abstract class AbstractData
|
||||
* @param array $options
|
||||
* @return privatebin_abstract
|
||||
*/
|
||||
public static function getInstance($options) {}
|
||||
public static function getInstance($options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a paste.
|
||||
@@ -143,12 +149,12 @@ abstract class AbstractData
|
||||
*/
|
||||
public function purge($batchsize)
|
||||
{
|
||||
if ($batchsize < 1) return;
|
||||
if ($batchsize < 1) {
|
||||
return;
|
||||
}
|
||||
$pastes = $this->_getExpiredPastes($batchsize);
|
||||
if (count($pastes))
|
||||
{
|
||||
foreach ($pastes as $pasteid)
|
||||
{
|
||||
if (count($pastes)) {
|
||||
foreach ($pastes as $pasteid) {
|
||||
$this->delete($pasteid);
|
||||
}
|
||||
}
|
||||
@@ -164,10 +170,11 @@ abstract class AbstractData
|
||||
*/
|
||||
protected function getOpenSlot(&$comments, $postdate)
|
||||
{
|
||||
if (array_key_exists($postdate, $comments))
|
||||
{
|
||||
if (array_key_exists($postdate, $comments)) {
|
||||
$parts = explode('.', $postdate, 2);
|
||||
if (!array_key_exists(1, $parts)) $parts[1] = 0;
|
||||
if (!array_key_exists(1, $parts)) {
|
||||
$parts[1] = 0;
|
||||
}
|
||||
++$parts[1];
|
||||
return $this->getOpenSlot($comments, implode('.', $parts));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user