Automatic pass to convert with php-cs-fixer
This commit is contained in:
@@ -1,27 +1,34 @@
|
||||
<?php
|
||||
|
||||
/** DomFramework
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
/**
|
||||
* DomFramework
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
|
||||
namespace Domframework;
|
||||
|
||||
/** The rate limit with file storage
|
||||
*/
|
||||
/**
|
||||
* The rate limit with file storage
|
||||
*/
|
||||
class Ratelimitfile extends Ratelimit
|
||||
{
|
||||
/** The storage directory */
|
||||
/**
|
||||
* The storage directory
|
||||
*/
|
||||
public $storageDir = "data/ratelimit/";
|
||||
/** Debug the ratelimiting process to screen */
|
||||
/**
|
||||
* Debug the ratelimiting process to screen
|
||||
*/
|
||||
public $debug = false;
|
||||
|
||||
/** The function set a rate-limit
|
||||
* @param string $name The rate-limit object to set
|
||||
* @return bool true if the rate-limit is not overloaded
|
||||
* false if the rate-limit is overloaded
|
||||
*/
|
||||
/**
|
||||
* The function set a rate-limit
|
||||
* @param string $name The rate-limit object to set
|
||||
* @return bool true if the rate-limit is not overloaded
|
||||
* false if the rate-limit is overloaded
|
||||
*/
|
||||
public function set($name)
|
||||
{
|
||||
$this->storageOK();
|
||||
@@ -75,10 +82,11 @@ class Ratelimitfile extends Ratelimit
|
||||
return true;
|
||||
}
|
||||
|
||||
/** The function delete a rate-limit
|
||||
* @param string $name The rate-limit object to del
|
||||
* @return bool
|
||||
*/
|
||||
/**
|
||||
* The function delete a rate-limit
|
||||
* @param string $name The rate-limit object to del
|
||||
* @return bool
|
||||
*/
|
||||
public function del($name)
|
||||
{
|
||||
$this->storageOK();
|
||||
@@ -93,9 +101,10 @@ class Ratelimitfile extends Ratelimit
|
||||
return true;
|
||||
}
|
||||
|
||||
/** The function clean the storage with expired entries
|
||||
* @return bool
|
||||
*/
|
||||
/**
|
||||
* The function clean the storage with expired entries
|
||||
* @return bool
|
||||
*/
|
||||
public function clean()
|
||||
{
|
||||
$this->storageOK();
|
||||
@@ -112,8 +121,9 @@ class Ratelimitfile extends Ratelimit
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Check the storageDir state
|
||||
*/
|
||||
/**
|
||||
* Check the storageDir state
|
||||
*/
|
||||
private function storageOK()
|
||||
{
|
||||
if (file_exists($this->storageDir)) {
|
||||
|
||||
Reference in New Issue
Block a user