"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Cache/Cache.php" between
cakephp-3.8.2.tar.gz and cakephp-3.8.3.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

Cache.php  (cakephp-3.8.2):Cache.php  (cakephp-3.8.3)
skipping to change at line 420 skipping to change at line 420
return $engine->readMany($keys); return $engine->readMany($keys);
} }
/** /**
* Increment a number under the key and return incremented value. * Increment a number under the key and return incremented value.
* *
* @param string $key Identifier for the data * @param string $key Identifier for the data
* @param int $offset How much to add * @param int $offset How much to add
* @param string $config Optional string configuration name. Defaults to 'de fault' * @param string $config Optional string configuration name. Defaults to 'de fault'
* @return mixed new value, or false if the data doesn't exist, is not integ er, * @return int|false New value, or false if the data doesn't exist, is not i nteger,
* or if there was an error fetching it. * or if there was an error fetching it.
*/ */
public static function increment($key, $offset = 1, $config = 'default') public static function increment($key, $offset = 1, $config = 'default')
{ {
$engine = static::pool($config); $engine = static::pool($config);
if (!is_int($offset) || $offset < 0) { if (!is_int($offset) || $offset < 0) {
return false; return false;
} }
return $engine->increment($key, $offset); return $engine->increment($key, $offset);
} }
/** /**
* Decrement a number under the key and return decremented value. * Decrement a number under the key and return decremented value.
* *
* @param string $key Identifier for the data * @param string $key Identifier for the data
* @param int $offset How much to subtract * @param int $offset How much to subtract
* @param string $config Optional string configuration name. Defaults to 'de fault' * @param string $config Optional string configuration name. Defaults to 'de fault'
* @return mixed new value, or false if the data doesn't exist, is not integ er, * @return int|false New value, or false if the data doesn't exist, is not i nteger,
* or if there was an error fetching it * or if there was an error fetching it
*/ */
public static function decrement($key, $offset = 1, $config = 'default') public static function decrement($key, $offset = 1, $config = 'default')
{ {
$engine = static::pool($config); $engine = static::pool($config);
if (!is_int($offset) || $offset < 0) { if (!is_int($offset) || $offset < 0) {
return false; return false;
} }
return $engine->decrement($key, $offset); return $engine->decrement($key, $offset);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)