* @note: This method is only needed if merge() uses mergeViaCas()
*
* @param string $key
- * @param mixed $casToken
+ * @param mixed &$casToken
* @param integer $flags Bitfield of BagOStuff::READ_* constants [optional]
* @return mixed Returns false on failure and if the item does not exist
* @throws Exception
$lSince = microtime( true ); // lock timestamp
- return new ScopedCallback( function() use ( $key, $lSince, $expiry ) {
+ return new ScopedCallback( function () use ( $key, $lSince, $expiry ) {
$latency = .050; // latency skew (err towards keeping lock present)
$age = ( microtime( true ) - $lSince + $latency );
if ( ( $age + $latency ) >= $expiry ) {
protected function debug( $text ) {
if ( $this->debugMode ) {
$this->logger->debug( "{class} debug: $text", [
- 'class' => get_class( $this ),
+ 'class' => static::class,
] );
}
}