mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing Code Sniffer errors
This commit is contained in:
parent
33f2f46868
commit
c2449c9d16
4 changed files with 3 additions and 4 deletions
|
@ -275,7 +275,7 @@ class Cache {
|
|||
*
|
||||
* @param string $config [optional] The config name you wish to have garbage collected. Defaults to 'default'
|
||||
* @param int $expires [optional] An expires timestamp. Defaults to NULL
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public static function gc($config = 'default', $expires = null) {
|
||||
return static::$_engines[$config]->gc($expires);
|
||||
|
|
|
@ -108,7 +108,7 @@ class FileEngine extends CacheEngine {
|
|||
* @param int $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was successfully cached, false on failure
|
||||
*/
|
||||
public function write($key, $data = null, $duration) {
|
||||
public function write($key, $data, $duration) {
|
||||
if (!$this->_init) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class CacheSession implements CakeSessionHandlerInterface {
|
|||
*/
|
||||
public function read($id) {
|
||||
$data = Cache::read($id, Configure::read('Session.handler.config'));
|
||||
if(empty($data)){
|
||||
if (empty($data)){
|
||||
return '';
|
||||
}
|
||||
return $data;
|
||||
|
|
|
@ -157,7 +157,6 @@ class DatabaseSessionTest extends CakeTestCase {
|
|||
|
||||
$this->assertTrue($this->storage->destroy('foo'), 'Destroy failed');
|
||||
$this->assertSame($this->storage->read('foo'), '');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue