/**
* @var array<String,SimpleXMLElement>
*/
- protected $xml = array();
+ protected $xml = [];
/**
* @var array|NULL
}
public function flush() {
- $this->xml = array();
+ $this->xml = [];
$this->hookCache = NULL;
$this->allCaseTypes = NULL;
- CRM_Core_DAO::$_dbColumnValueCache = array();
+ CRM_Core_DAO::$_dbColumnValueCache = [];
}
/**
* @param array $allCaseTypes
* @param array $xml
*/
- public function __construct($allCaseTypes = NULL, $xml = array()) {
+ public function __construct($allCaseTypes = NULL, $xml = []) {
$this->allCaseTypes = $allCaseTypes;
$this->xml = $xml;
}
if (isset($config->customTemplateDir) && $config->customTemplateDir) {
// check if the file exists in the custom templates directory
$fileName = implode(DIRECTORY_SEPARATOR,
- array(
+ [
$config->customTemplateDir,
'CRM',
'Case',
'xml',
'configuration',
"$caseType.xml",
- )
+ ]
);
}
}
if (!file_exists($fileName)) {
// check if file exists locally
$fileName = implode(DIRECTORY_SEPARATOR,
- array(
+ [
dirname(__FILE__),
'xml',
'configuration',
"$caseType.xml",
- )
+ ]
);
}
if (!file_exists($fileName)) {
// check if file exists locally
$fileName = implode(DIRECTORY_SEPARATOR,
- array(
+ [
dirname(__FILE__),
'xml',
'configuration.sample',
"$caseType.xml",
- )
+ ]
);
}
}
*/
public function getCaseTypesViaHook() {
if ($this->hookCache === NULL) {
- $this->hookCache = array();
+ $this->hookCache = [];
CRM_Utils_Hook::caseTypes($this->hookCache);
}
return $this->hookCache;
* @return array<string> symbolic-names of activity-types
*/
public function getAllDeclaredActivityTypes() {
- $result = array();
+ $result = [];
$p = new CRM_Case_XMLProcessor_Process();
foreach ($this->getAllCaseTypes() as $caseTypeName) {
* @return array<string> symbolic-names of relationship-types
*/
public function getAllDeclaredRelationshipTypes() {
- $result = array();
+ $result = [];
$p = new CRM_Case_XMLProcessor_Process();
foreach ($this->getAllCaseTypes() as $caseTypeName) {