Permalink
Browse files

Replaced array() with []

  • Loading branch information...
Cameri committed Oct 29, 2013
1 parent a2a7dc9 commit 9a57943dc7ce3820cb5baf0b9946c378f29638c8
Showing with 8 additions and 8 deletions.
  1. +8 −8 Cake/Cache/Engine/XcacheEngine.php
@@ -35,24 +35,24 @@ class XcacheEngine 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 (php_sapi_name() !== 'cli') {
parent::init(array_merge(array(
parent::init(array_merge([
'prefix' => Inflector::slug(APP_DIR) . '_',
'PHP_AUTH_USER' => 'user',
'PHP_AUTH_PW' => 'password'
), $settings)
], $settings)
);
return function_exists('xcache_info');
}
@@ -149,7 +149,7 @@ public function clear($check) {
* @return array
*/
public function groups() {
$result = array();
$result = [];
foreach ($this->settings['groups'] as $group) {
$value = xcache_get($this->settings['prefix'] . $group);
if (!$value) {
@@ -182,8 +182,8 @@ public function clearGroup($group) {
* @return void
*/
protected function _auth($reverse = false) {
static $backup = array();
$keys = array('PHP_AUTH_USER' => 'user', 'PHP_AUTH_PW' => 'password');
static $backup = [];
$keys = ['PHP_AUTH_USER' => 'user', 'PHP_AUTH_PW' => 'password'];
foreach ($keys as $key => $setting) {
if ($reverse) {
if (isset($backup[$key])) {

0 comments on commit 9a57943

Please sign in to comment.