ZP-739 The guideline of the project state that the private function must start...

ZP-739 The guideline of the project state that the private function must start by a lowercase. Released under the Affero GNU General Public License (AGPL) version 3.
parent 0c44bb88
...@@ -154,7 +154,7 @@ class Ping extends RequestProcessor { ...@@ -154,7 +154,7 @@ class Ping extends RequestProcessor {
if(!self::$decoder->getElementEndTag()) if(!self::$decoder->getElementEndTag())
return false; return false;
if(!$this->LifetimeBetweenBound($sc->GetLifetime())){ if(!$this->lifetimeBetweenBound($sc->GetLifetime())){
$pingstatus = SYNC_PINGSTATUS_HBOUTOFRANGE; $pingstatus = SYNC_PINGSTATUS_HBOUTOFRANGE;
} }
// save changed data // save changed data
...@@ -168,7 +168,7 @@ class Ping extends RequestProcessor { ...@@ -168,7 +168,7 @@ class Ping extends RequestProcessor {
$pingstatus = SYNC_PINGSTATUS_FAILINGPARAMS; $pingstatus = SYNC_PINGSTATUS_FAILINGPARAMS;
ZLog::Write(LOGLEVEL_DEBUG, "HandlePing(): no pingable folders found and no initialization data sent. Returning SYNC_PINGSTATUS_FAILINGPARAMS."); ZLog::Write(LOGLEVEL_DEBUG, "HandlePing(): no pingable folders found and no initialization data sent. Returning SYNC_PINGSTATUS_FAILINGPARAMS.");
} }
elseif(!$this->LifetimeBetweenBound($sc->GetLifetime())){ elseif(!$this->lifetimeBetweenBound($sc->GetLifetime())){
$pingstatus = SYNC_PINGSTATUS_FAILINGPARAMS; $pingstatus = SYNC_PINGSTATUS_FAILINGPARAMS;
ZLog::Write(LOGLEVEL_DEBUG, "HandlePing(): ping lifetime not between bound (higher bound:`".PING_HIGHER_BOUND_LIFETIME."` lower bound:`".PING_LOWER_BOUND_LIFETIME."` current lifetime:`".$sc->GetLifetime()."`. Returning SYNC_PINGSTATUS_FAILINGPARAMS."); ZLog::Write(LOGLEVEL_DEBUG, "HandlePing(): ping lifetime not between bound (higher bound:`".PING_HIGHER_BOUND_LIFETIME."` lower bound:`".PING_LOWER_BOUND_LIFETIME."` current lifetime:`".$sc->GetLifetime()."`. Returning SYNC_PINGSTATUS_FAILINGPARAMS.");
} }
...@@ -248,10 +248,12 @@ class Ping extends RequestProcessor { ...@@ -248,10 +248,12 @@ class Ping extends RequestProcessor {
/** /**
* Return true if the ping lifetime is between the specified bound (PING_HIGHER_BOUND_LIFETIME and PING_LOWER_BOUND_LIFETIME). If no bound are specified, it returns true. * Return true if the ping lifetime is between the specified bound (PING_HIGHER_BOUND_LIFETIME and PING_LOWER_BOUND_LIFETIME). If no bound are specified, it returns true.
* *
* @param int $lifetime
*
* @access private * @access private
* @return boolean * @return boolean
*/ */
private function LifetimeBetweenBound($lifetime){ private function lifetimeBetweenBound($lifetime){
if(PING_HIGHER_BOUND_LIFETIME !== false && PING_LOWER_BOUND_LIFETIME !== false){ if(PING_HIGHER_BOUND_LIFETIME !== false && PING_LOWER_BOUND_LIFETIME !== false){
return ($lifetime <= PING_HIGHER_BOUND_LIFETIME && $lifetime >= PING_LOWER_BOUND_LIFETIME); return ($lifetime <= PING_HIGHER_BOUND_LIFETIME && $lifetime >= PING_LOWER_BOUND_LIFETIME);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment