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 1851796 commit 2c89310
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Cake/Cache/Engine/FileEngine.php
Expand Up @@ -55,7 +55,7 @@ class FileEngine extends CacheEngine {
* @var array
* @see CacheEngine::__defaults
*/
public $settings = array();
public $settings = [];

/**
* True unless FileEngine::__active(); fails
Expand All @@ -72,15 +72,15 @@ class FileEngine extends CacheEngine {
* @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()) {
$settings += array(
public function init($settings = []) {
$settings += [
'path' => CACHE,
'prefix' => 'cake_',
'lock' => true,
'serialize' => true,
'isWindows' => false,
'mask' => 0664
);
];
parent::init($settings);

if (DS === '\\') {
Expand Down Expand Up @@ -365,7 +365,7 @@ protected function _setKey($key, $createKey = false) {
if (!$exists && !chmod($this->_File->getPathname(), (int)$this->settings['mask'])) {
trigger_error(__d(
'cake_dev', 'Could not apply permission mask "%s" on cache file "%s"',
array($this->_File->getPathname(), $this->settings['mask'])), E_USER_WARNING);
[$this->_File->getPathname(), $this->settings['mask']]), E_USER_WARNING);
}
}
return true;
Expand Down Expand Up @@ -403,7 +403,7 @@ public function key($key) {
return false;
}

$key = Inflector::underscore(str_replace(array(DS, '/', '.', '<', '>', '?', ':', '|', '*', '"'), '_', strval($key)));
$key = Inflector::underscore(str_replace([DS, '/', '.', '<', '>', '?', ':', '|', '*', '"'], '_', strval($key)));
return $key;
}

Expand Down

0 comments on commit 2c89310

Please sign in to comment.