mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-02 03:26:06 -04:00
address Codacy issues
This commit is contained in:
parent
93135e0abf
commit
1f2dddd9d8
4 changed files with 15 additions and 24 deletions
|
@ -35,7 +35,7 @@ abstract class AbstractData
|
|||
* @static
|
||||
* @var array
|
||||
*/
|
||||
protected static $_traffic_limiter_cache = array();
|
||||
protected static $_last_cache = array();
|
||||
|
||||
/**
|
||||
* Enforce singleton, disable constructor
|
||||
|
@ -150,9 +150,9 @@ abstract class AbstractData
|
|||
public function purgeValues($namespace, $time)
|
||||
{
|
||||
if ($namespace === 'traffic_limiter') {
|
||||
foreach (self::$_traffic_limiter_cache as $key => $last_access) {
|
||||
if ($last_access <= $time) {
|
||||
unset(self::$_traffic_limiter_cache[$key]);
|
||||
foreach (self::$_last_cache as $key => $last_submission) {
|
||||
if ($last_submission <= $time) {
|
||||
unset(self::$_last_cache[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue