/**
* @param $xmlString
- * @param $confFilename
+ * @param string $confFilename
*/
public function __construct($xmlString, $confFilename) {
$this->xmlString = $xmlString;
$ifBlankReplacements = array();
- $completed = FALSE;
+ $completed = FALSE;
$sortValues = array('1970-01-01');
- $category = '';
+ $category = '';
$fieldindex = 1;
- $fields = $activity->getElementsByTagName("Field");
+ $fields = $activity->getElementsByTagName("Field");
foreach ($fields as $field) {
$datatype_elements = $field->getElementsByTagName("Type");
$datatype = $datatype_elements->item(0)->nodeValue;
//CRM-4570
if ($printReport) {
if (!in_array($label, array(
- 'Activity Type', 'Status'))) {
+ 'Activity Type',
+ 'Status',
+ ))
+ ) {
$caseActivities[$activityindex][$fieldindex] = array();
$caseActivities[$activityindex][$fieldindex]['label'] = $label;
$caseActivities[$activityindex][$fieldindex]['datatype'] = $datatype;
*
* This is intended to be called as a sort callback function, returning whether an activity's date is earlier or later than another's.
* The type of date to use is specified in the config.
- *
*/
/**
}
if ($aval < $bval) {
- return - 1;
+ return -1;
}
elseif ($aval > $bval) {
return 1;
}
/**
- * @param $xmlString
- * @param $clientID
- * @param $caseID
+ * @param string $xmlString
+ * @param int $clientID
+ * @param int $caseID
* @param bool $printReport
*
* @return mixed
*/
- static
- function run($xmlString, $clientID, $caseID, $printReport = FALSE) {
+ public static function run($xmlString, $clientID, $caseID, $printReport = FALSE) {
/*
-$fh = fopen('C:/temp/audit2.xml', 'w');
-fwrite($fh, $xmlString);
-fclose($fh);
-*/
+ $fh = fopen('C:/temp/audit2.xml', 'w');
+ fwrite($fh, $xmlString);
+ fclose($fh);
+ */
$audit = new CRM_Case_Audit_Audit($xmlString, 'audit.conf.xml');
$activities = $audit->getActivities($printReport);
}
return $contents;
}
+
}