+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* Manage translatable strings on behalf of resource files.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
* $Id$
*/
class CRM_Core_Resources_Strings {
* List of translatable strings.
*/
public function get($bucket, $file, $format) {
- $stringsByFile = $this->cache->get($bucket); // array($file => array(...strings...))
+ // array($file => array(...strings...))
+ $stringsByFile = $this->cache->get($bucket);
if (!$stringsByFile) {
- $stringsByFile = array();
+ $stringsByFile = [];
}
if (!isset($stringsByFile[$file])) {
if ($file && is_readable($file)) {
$stringsByFile[$file] = $this->extract($file, $format);
}
else {
- $stringsByFile[$file] = array();
+ $stringsByFile[$file] = [];
}
$this->cache->set($bucket, $stringsByFile);
}