Skip to content

Commit

Permalink
Replaced array() with []
Browse files Browse the repository at this point in the history
  • Loading branch information
cameri committed Oct 29, 2013
1 parent 8b1860c commit 84bf44b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Cake/Cache/Engine/RedisEngine.php
Expand Up @@ -40,29 +40,29 @@ class RedisEngine extends CacheEngine {
*
* @var array
*/
public $settings = array();
public $settings = [];

/**
* Initialize the Cache Engine
*
* Called automatically by the cache frontend
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = []);
*
* @param array $settings array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
*/
public function init($settings = array()) {
public function init($settings = []) {
if (!class_exists('Redis')) {
return false;
}
parent::init(array_merge(array(
parent::init(array_merge([
'prefix' => null,
'server' => '127.0.0.1',
'port' => 6379,
'password' => false,
'timeout' => 0,
'persistent' => true
), $settings)
], $settings)
);

return $this->_connect();
Expand Down Expand Up @@ -183,7 +183,7 @@ public function clear($check) {
* @return array
*/
public function groups() {
$result = array();
$result = [];
foreach ($this->settings['groups'] as $group) {
$value = $this->_Redis->get($this->settings['prefix'] . $group);
if (!$value) {
Expand Down

0 comments on commit 84bf44b

Please sign in to comment.