From: Tim Otten Date: Wed, 14 Jan 2015 04:53:48 +0000 (-0800) Subject: INFRA-132 - Batch 0 (set g) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=795492f30ecf0ac59d381960e44ac62dcb2b0628;p=civicrm-core.git INFRA-132 - Batch 0 (set g) --- diff --git a/CRM/ACL/Page/EntityRole.php b/CRM/ACL/Page/EntityRole.php index 338504d984..4a6c8aa49b 100644 --- a/CRM/ACL/Page/EntityRole.php +++ b/CRM/ACL/Page/EntityRole.php @@ -126,7 +126,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic { 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1' ), - ) + ), ); CRM_Utils_System::appendBreadCrumb($breadCrumb); CRM_Utils_System::setTitle(ts('Assign Users to Roles')); diff --git a/CRM/Admin/Form/Tag.php b/CRM/Admin/Form/Tag.php index af478be545..2ddd301f5e 100644 --- a/CRM/Admin/Form/Tag.php +++ b/CRM/Admin/Form/Tag.php @@ -94,7 +94,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form { ); $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array( 'CRM_Core_DAO_Tag', - $this->_id + $this->_id, )); $this->add('text', 'description', ts('Description'), diff --git a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php index 966eb4ba9d..24cdfe3169 100644 --- a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php +++ b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php @@ -96,7 +96,7 @@ class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Searc * * @return string */ - function all( + public function all( $offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE ) { diff --git a/CRM/Contact/Form/Task/Unhold.php b/CRM/Contact/Form/Task/Unhold.php index 05ec941b34..70487f4136 100644 --- a/CRM/Contact/Form/Task/Unhold.php +++ b/CRM/Contact/Form/Task/Unhold.php @@ -31,13 +31,13 @@ WHERE on_hold = 1 AND hold_date is not null AND contact_id in (" . implode(",", if ($result) { CRM_Core_Session::setStatus(ts('%count email was found on hold and updated.', array( 'count' => $result, - 'plural' => '%count emails were found on hold and updated.' + 'plural' => '%count emails were found on hold and updated.', )), ts('Emails Restored'), 'success'); } else { CRM_Core_Session::setStatus(ts('The selected contact does not have an email on hold.', array( 'count' => $result, - 'plural' => 'None of the selected contacts have an email on hold.' + 'plural' => 'None of the selected contacts have an email on hold.', )), ts('No Emails to Restore'), 'info'); } } diff --git a/CRM/Contribute/Form/Task/Email.php b/CRM/Contribute/Form/Task/Email.php index 61a8c04d8c..4b74ea47ff 100644 --- a/CRM/Contribute/Form/Task/Email.php +++ b/CRM/Contribute/Form/Task/Email.php @@ -61,7 +61,7 @@ class CRM_Contribute_Form_Task_Email extends CRM_Contribute_Form_Task { * * @return void */ - function preProcess() { + public function preProcess() { CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); parent::preProcess(); diff --git a/CRM/Contribute/Page/UserDashboard.php b/CRM/Contribute/Page/UserDashboard.php index d33b0a618e..608f2cbff1 100644 --- a/CRM/Contribute/Page/UserDashboard.php +++ b/CRM/Contribute/Page/UserDashboard.php @@ -36,8 +36,6 @@ class CRM_Contribute_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBo /** * called when action is browse - * - * @return null */ public function listContribution() { $controller = new CRM_Core_Controller_Simple( @@ -145,8 +143,6 @@ class CRM_Contribute_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBo /** * the main function that is called when the page * loads, it decides the which action has to be taken for the page. - * - * @return null */ public function run() { $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings'); diff --git a/CRM/Core/BAO/Cache.php b/CRM/Core/BAO/Cache.php index d3e5dfd8b2..8755afd8b2 100644 --- a/CRM/Core/BAO/Cache.php +++ b/CRM/Core/BAO/Cache.php @@ -376,7 +376,7 @@ AND CREATE_TIME < date_sub( NOW( ), INTERVAL $timeIntervalDays day ) ); foreach ($transactionPages as $trPage) { $params[] = array("%${trPage}%", 'String'); - $where[] = 'path LIKE %' . sizeof($params); + $where[] = 'path LIKE %' . count($params); } $sql = " diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 5216ab7202..ed999153f0 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -129,7 +129,7 @@ class CRM_Core_DAO extends DB_DataObject { $required = TRUE; } if (!$required && $dbName != 'contact_id') { - $fkDAO = new $FKClassName; + $fkDAO = new $FKClassName(); if ($fkDAO->find(TRUE)) { $this->$dbName = $fkDAO->id; } @@ -221,8 +221,8 @@ class CRM_Core_DAO extends DB_DataObject { case CRM_Utils_Type::T_TIME: CRM_Core_Error::fatal('T_TIME shouldnt be used.'); - //$object->$dbName='000000'; - //break; + //$object->$dbName='000000'; + //break; case CRM_Utils_Type::T_CCNUM: $this->$dbName = '4111 1111 1111 1111'; break; @@ -409,7 +409,7 @@ class CRM_Core_DAO extends DB_DataObject { * * @return array */ - static function &fields() { + public static function &fields() { $result = NULL; return $result; } @@ -417,7 +417,6 @@ class CRM_Core_DAO extends DB_DataObject { /** * Get/set an associative array of table columns * - * @param array key=>type array * @return array * (associative) */ @@ -504,8 +503,8 @@ class CRM_Core_DAO extends DB_DataObject { * @param array $params * (reference ) associative array of name/value pairs. * - * @return boolean - * did we copy all null values into the object + * @return bool + * Did we copy all null values into the object */ public function copyValues(&$params) { $fields = &$this->fields(); @@ -670,7 +669,7 @@ class CRM_Core_DAO extends DB_DataObject { * @param string $fieldName * The name of the field in the DAO. * - * @return boolean + * @return bool * true if object exists */ public static function objectExists($value, $daoName, $daoID, $fieldName = 'name') { @@ -695,7 +694,7 @@ class CRM_Core_DAO extends DB_DataObject { * @param bool $i18nRewrite * Whether to rewrite the query on multilingual setups. * - * @return boolean + * @return bool * true if exists, else false */ public static function checkFieldExists($tableName, $columnName, $i18nRewrite = TRUE) { @@ -779,7 +778,7 @@ LIKE %1 * @param string $tableName * @param string $constraint * - * @return boolean + * @return bool * true if constraint exists, false otherwise */ public static function checkConstraintExists($tableName, $constraint) { @@ -807,7 +806,7 @@ LIKE %1 * * @throws Exception * - * @return boolean + * @return bool * true if CONSTRAINT keyword exists, false otherwise */ public static function schemaRequiresRebuilding($tables = array("civicrm_contact")) { @@ -843,7 +842,7 @@ LIKE %1 * @param string $tableName * @param string $columnName * - * @return boolean + * @return bool * true if in format, false otherwise */ public static function checkFKConstraintInFormat($tableName, $columnName) { @@ -872,7 +871,7 @@ LIKE %1 * @param string $columnName * @param string $columnValue * - * @return boolean + * @return bool * true if the value is always $columnValue, false otherwise */ public static function checkFieldHasAlwaysValue($tableName, $columnName, $columnValue) { @@ -889,7 +888,7 @@ LIKE %1 * @param string $tableName * @param string $columnName * - * @return boolean + * @return bool * true if if the value is always NULL, false otherwise */ public static function checkFieldIsAlwaysNull($tableName, $columnName) { @@ -905,7 +904,7 @@ LIKE %1 * * @param string $tableName * - * @return boolean + * @return bool * true if exists, else false */ public static function checkTableExists($tableName) { @@ -1017,7 +1016,7 @@ FROM civicrm_domain * @param string $searchColumn * Name of the column you want to search by. * - * @return boolean + * @return bool * true if we found and updated the object, else false */ public static function setFieldValue($daoName, $searchValue, $setColumn, $setValue, $searchColumn = 'id') { @@ -1128,7 +1127,7 @@ FROM civicrm_domain * @return CRM_Core_DAO * object that holds the results of the query */ - static function &executeQuery( + public static function &executeQuery( $query, $params = array(), $abort = TRUE, @@ -1178,7 +1177,7 @@ FROM civicrm_domain * the result of the query if any * */ - static function &singleValueQuery( + public static function &singleValueQuery( $query, $params = array(), $abort = TRUE, @@ -1309,7 +1308,7 @@ FROM civicrm_domain * @return CRM_Core_DAO * the newly created copy of the object */ - static function ©Generic($daoName, $criteria, $newData = NULL, $fieldsFix = NULL, $blockCopyOfDependencies = NULL) { + public static function ©Generic($daoName, $criteria, $newData = NULL, $fieldsFix = NULL, $blockCopyOfDependencies = NULL) { $object = new $daoName(); if (!$newData) { $object->id = $criteria['id']; @@ -1462,7 +1461,7 @@ SELECT contact_id * an object of type referenced by daoName */ public static function commonRetrieveAll($daoName, $fieldIdName = 'id', $fieldId, &$details, $returnProperities = NULL) { - require_once(str_replace('_', DIRECTORY_SEPARATOR, $daoName) . ".php"); + require_once str_replace('_', DIRECTORY_SEPARATOR, $daoName) . ".php"; $object = new $daoName(); $object->$fieldIdName = $fieldId; @@ -1583,9 +1582,10 @@ SELECT contact_id * @param int $numObjects * @param bool $createOnly * - * @return + * @return object|array|NULL + * NULL if $createOnly. A single object if $numObjects==1. Otherwise, an array of multiple objects. */ - static function createTestObject( + public static function createTestObject( $daoName, $params = array(), $numObjects = 1, @@ -1602,7 +1602,7 @@ SELECT contact_id 'CRM_Core_DAO_StateProvince', 'CRM_Core_DAO_Country', 'CRM_Core_DAO_Domain', - 'CRM_Financial_DAO_FinancialType' + 'CRM_Financial_DAO_FinancialType', //because valid ones exist & we use pick them due to pseudoconstant can't reliably create & delete these ); @@ -1651,7 +1651,7 @@ SELECT contact_id } if ($createOnly) { - return; + return NULL; } elseif ($numObjects == 1) { return $objects[0]; @@ -1823,7 +1823,7 @@ SELECT contact_id public static function triggerRebuild($tableName = NULL, $force = FALSE) { $info = array(); - $logging = new CRM_Logging_Schema; + $logging = new CRM_Logging_Schema(); $logging->triggerInfo($info, $tableName, $force); CRM_Core_I18n_Schema::triggerInfo($info, $tableName); @@ -1864,7 +1864,7 @@ SELECT contact_id public static function dropTriggers($tableName = NULL) { $info = array(); - $logging = new CRM_Logging_Schema; + $logging = new CRM_Logging_Schema(); $logging->triggerInfo($info, $tableName); // drop all existing triggers on all tables @@ -2122,11 +2122,11 @@ SELECT contact_id * * @param string $fieldName * @param string $context - * @see CRM_Core_DAO::buildOptionsContext. + * @see CRM_Core_DAO::buildOptionsContext * @param array $props * whatever is known about this bao object. * - * @return Array|bool + * @return array|bool */ public static function buildOptions($fieldName, $context = NULL, $props = array()) { // If a given bao does not override this function @@ -2142,7 +2142,7 @@ SELECT contact_id public function getOptionLabels() { $fields = $this->fields(); if ($fields === NULL) { - throw new Exception ('Cannot call getOptionLabels on CRM_Core_DAO'); + throw new Exception('Cannot call getOptionLabels on CRM_Core_DAO'); } foreach ($fields as $field) { $name = CRM_Utils_Array::value('name', $field); @@ -2270,13 +2270,12 @@ SELECT contact_id } $escapedCriteria = array_map(array( 'CRM_Core_DAO', - 'escapeString' + 'escapeString', ), $criteria); if (!$returnSanitisedArray) { return (sprintf('%s %s ("%s")', $fieldName, $operator, implode('", "', $escapedCriteria))); } return $escapedCriteria; - break; // binary operators @@ -2313,7 +2312,7 @@ SELECT contact_id 'BETWEEN', 'NOT BETWEEN', 'IS NOT NULL', - 'IS NULL' + 'IS NULL', ); } diff --git a/CRM/Core/QuickForm/NestedAdvMultiSelect.php b/CRM/Core/QuickForm/NestedAdvMultiSelect.php index 92d488ee50..15f81d8f86 100644 --- a/CRM/Core/QuickForm/NestedAdvMultiSelect.php +++ b/CRM/Core/QuickForm/NestedAdvMultiSelect.php @@ -61,7 +61,7 @@ class CRM_Core_QuickForm_NestedAdvMultiSelect extends HTML_QuickForm_advmultisel * @throws PEAR_Error * @see loadArray() */ - function load( + public function load( &$options, $param1 = NULL, $param2 = NULL, $param3 = NULL, $param4 = NULL ) { diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php index 07c7bb797d..4776f8024d 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php @@ -108,5 +108,3 @@ AND " . self::internalFilters($rg); return array("civicrm_contact.{$rg->name}.{$rg->threshold}" => $query); } } - -; diff --git a/CRM/Event/Form/ParticipantFeeSelection.php b/CRM/Event/Form/ParticipantFeeSelection.php index 0e0be7404a..6d1d7d4399 100644 --- a/CRM/Event/Form/ParticipantFeeSelection.php +++ b/CRM/Event/Form/ParticipantFeeSelection.php @@ -181,7 +181,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form { $statusOptions = CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label'); $this->add('select', 'status_id', ts('Participant Status'), array( - '' => ts('- select -') + '' => ts('- select -'), ) + $statusOptions, TRUE ); diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 97ecd92d29..6340976779 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -123,7 +123,7 @@ class CRM_Mailing_BAO_Mailing extends CRM_Mailing_DAO_Mailing { * * @return CRM_Mailing_Event_BAO_Queue|string */ - static function &getRecipients( + public static function &getRecipients( $job_id, $mailing_id = NULL, $offset = NULL, @@ -623,11 +623,8 @@ ORDER BY i.contact_id, i.{$tempColumn} } /** - * - * Returns the regex patterns that are used for preparing the text and html templates - * - * - **/ + * Returns the regex patterns that are used for preparing the text and html templates. + */ private function &getPatterns($onlyHrefs = FALSE) { $patterns = array(); @@ -648,16 +645,17 @@ ORDER BY i.contact_id, i.{$tempColumn} $patterns[] = '\\\\\{\w+\.\w+\\\\\}|\{\{\w+\.\w+\}\}'; $patterns[] = '\{\w+\.\w+\}'; - $patterns = '{' . join('|', $patterns) . '}im'; + $patterns = '{' . implode('|', $patterns) . '}im'; return $patterns; } /** - * returns an array that denotes the type of token that we are dealing with - * we use the type later on when we are doing a token replcement lookup + * Returns an array that denotes the type of token that we are dealing with + * we use the type later on when we are doing a token replacement lookup * - * @param string $token The token for which we will be doing adata lookup + * @param string $token + * The token for which we will be doing adata lookup. * * @return array * An array that holds the token itself and the type. @@ -723,9 +721,7 @@ ORDER BY i.contact_id, i.{$tempColumn} * Prepares the text and html templates * for generating the emails and returns a copy of the * prepared templates - * - * - **/ + */ private function getPreparedTemplates() { if (!$this->preparedTemplates) { $patterns['html'] = $this->getPatterns(TRUE); @@ -737,7 +733,7 @@ ORDER BY i.contact_id, i.{$tempColumn} foreach (array( 'html', 'text', - 'subject' + 'subject', ) as $key) { if (!isset($templates[$key])) { continue; @@ -765,16 +761,13 @@ ORDER BY i.contact_id, i.{$tempColumn} } /** - * - * Retrieve a ref to an array that holds the email and text templates for this email - * assembles the complete template including the header and footer - * that the user has uploaded or declared (if they have dome that) - * + * Retrieve a ref to an array that holds the email and text templates for this email + * assembles the complete template including the header and footer + * that the user has uploaded or declared (if they have dome that) * * @return array * reference to an assoc array - * - **/ + */ private function &getTemplates() { if (!$this->templates) { $this->getHeaderFooter(); @@ -792,7 +785,7 @@ ORDER BY i.contact_id, i.{$tempColumn} $template[] = $this->footer->body_text; } - $this->templates['text'] = join("\n", $template); + $this->templates['text'] = implode("\n", $template); } if ($this->body_html) { @@ -808,7 +801,7 @@ ORDER BY i.contact_id, i.{$tempColumn} $template[] = $this->footer->body_html; } - $this->templates['html'] = join("\n", $template); + $this->templates['html'] = implode("\n", $template); // this is where we create a text template from the html template if the text template did not exist // this way we ensure that every recipient will receive an email even if the pref is set to text and the @@ -821,7 +814,7 @@ ORDER BY i.contact_id, i.{$tempColumn} if ($this->subject) { $template = array(); $template[] = $this->subject; - $this->templates['subject'] = join("\n", $template); + $this->templates['subject'] = implode("\n", $template); } } return $this->templates; @@ -841,8 +834,7 @@ ORDER BY i.contact_id, i.{$tempColumn} * * @return array * reference to an assoc array - * - **/ + */ public function &getTokens() { if (!$this->tokens) { @@ -875,8 +867,7 @@ ORDER BY i.contact_id, i.{$tempColumn} * * @return array * reference to an assoc array - * - **/ + */ public function &getFlattenedTokens() { if (!$this->flattenedTokens) { $tokens = $this->getTokens(); @@ -934,7 +925,7 @@ ORDER BY i.contact_id, i.{$tempColumn} 'return' => 'id', 'options' => array( 'limit' => 100000000000, - ) + ), ) ); @@ -968,11 +959,7 @@ ORDER BY civicrm_email.is_bulkmail DESC } /** - * Retrieve the header and footer for this mailing - * - * @param void - * - * @return void + * Load this->header and this->footer. */ private function getHeaderFooter() { if (!$this->header and $this->header_id) { @@ -1303,7 +1290,7 @@ ORDER BY civicrm_email.is_bulkmail DESC ($contact['preferred_mail_format'] == 'HTML' && !array_key_exists('html', $pEmails)) ) ) { - $textBody = join('', $text); + $textBody = implode('', $text); if ($useSmarty) { $textBody = $smarty->fetch("string:$textBody"); } @@ -1314,7 +1301,7 @@ ORDER BY civicrm_email.is_bulkmail DESC $contact['preferred_mail_format'] == 'Both' )) ) { - $htmlBody = join('', $html); + $htmlBody = implode('', $html); if ($useSmarty) { $htmlBody = $smarty->fetch("string:$htmlBody"); } @@ -1335,7 +1322,7 @@ ORDER BY civicrm_email.is_bulkmail DESC $mailingSubject = CRM_Utils_Array::value('subject', $pEmails); if (is_array($mailingSubject)) { - $mailingSubject = join('', $mailingSubject); + $mailingSubject = implode('', $mailingSubject); } $mailParams['Subject'] = $mailingSubject; @@ -1358,7 +1345,7 @@ ORDER BY civicrm_email.is_bulkmail DESC 'html', 'attachments', 'toName', - 'toEmail' + 'toEmail', )) ) { $headers[$paramKey] = $paramValue; @@ -1806,8 +1793,7 @@ ORDER BY civicrm_email.is_bulkmail DESC 'bounce' => CRM_Mailing_Event_BAO_Bounce::getTableName(), 'forward' => CRM_Mailing_Event_BAO_Forward::getTableName(), 'url' => CRM_Mailing_BAO_TrackableURL::getTableName(), - 'urlopen' => - CRM_Mailing_Event_BAO_TrackableURLOpen::getTableName(), + 'urlopen' => CRM_Mailing_Event_BAO_TrackableURLOpen::getTableName(), 'component' => CRM_Mailing_BAO_Component::getTableName(), 'spool' => CRM_Mailing_BAO_Spool::getTableName(), ); @@ -1876,10 +1862,9 @@ ORDER BY civicrm_email.is_bulkmail DESC $report['component'][] = array( 'type' => $components[$mailing->type], 'name' => $mailing->name, - 'link' => - CRM_Utils_System::url('civicrm/mailing/component', - "reset=1&action=update&id={$mailing->id}" - ), + 'link' => CRM_Utils_System::url('civicrm/mailing/component', + "reset=1&action=update&id={$mailing->id}" + ), ); } @@ -2070,7 +2055,7 @@ ORDER BY civicrm_email.is_bulkmail DESC foreach (array( 'scheduled_date', 'start_date', - 'end_date' + 'end_date', ) as $key) { $row[$key] = CRM_Utils_Date::customFormat($row[$key]); } @@ -2124,16 +2109,14 @@ ORDER BY civicrm_email.is_bulkmail DESC while ($mailing->fetch()) { $report['click_through'][] = array( 'url' => $mailing->url, - 'link' => - CRM_Utils_System::url( - 'civicrm/mailing/report/event', - "reset=1&event=click&mid=$mailing_id&uid={$mailing->id}" - ), - 'link_unique' => - CRM_Utils_System::url( - 'civicrm/mailing/report/event', - "reset=1&event=click&mid=$mailing_id&uid={$mailing->id}&distinct=1" - ), + 'link' => CRM_Utils_System::url( + 'civicrm/mailing/report/event', + "reset=1&event=click&mid=$mailing_id&uid={$mailing->id}" + ), + 'link_unique' => CRM_Utils_System::url( + 'civicrm/mailing/report/event', + "reset=1&event=click&mid=$mailing_id&uid={$mailing->id}&distinct=1" + ), 'clicks' => $mailing->clicks, 'unique' => $mailing->unique_clicks, 'rate' => CRM_Utils_Array::value('delivered', $report['event_totals']) ? (100.0 * $mailing->unique_clicks) / $report['event_totals']['delivered'] : 0, @@ -2185,11 +2168,10 @@ ORDER BY civicrm_email.is_bulkmail DESC $actionLinks = array(CRM_Core_Action::VIEW => array('name' => ts('Report'))); if (CRM_Core_Permission::check('view all contacts')) { - $actionLinks[CRM_Core_Action::ADVANCED] = - array( - 'name' => ts('Advanced Search'), - 'url' => 'civicrm/contact/search/advanced', - ); + $actionLinks[CRM_Core_Action::ADVANCED] = array( + 'name' => ts('Advanced Search'), + 'url' => 'civicrm/contact/search/advanced', + ); } $action = array_sum(array_keys($actionLinks)); @@ -2306,7 +2288,6 @@ ORDER BY civicrm_email.is_bulkmail DESC if (!in_array($id, $mailingIDs)) { CRM_Core_Error::fatal(ts('You do not have permission to access this mailing report')); } - return; } /** @@ -2337,8 +2318,8 @@ ORDER BY civicrm_email.is_bulkmail DESC * where the user has access to ALL groups, and hence ALL mailings and return a * value of TRUE (to avoid the downstream where clause with a list of mailing list IDs * - * @return boolean - * | array - TRUE if the user has access to all mailings, else array of mailing IDs (possibly empty) + * @return bool|array + * TRUE if the user has access to all mailings, else array of mailing IDs (possibly empty). */ public static function mailingACLIDs() { // CRM-11633 @@ -2692,7 +2673,7 @@ LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id $form->assign('templates', TRUE); $form->add('select', 'template', ts('Select Template'), array( - '' => ts('- select -') + '' => ts('- select -'), ) + $form->_templates, FALSE, array('onChange' => "selectValue( this.value,'' );") ); @@ -2839,7 +2820,7 @@ WHERE civicrm_mailing_job.id = %1 if ($mode == NULL && CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") { throw new CRM_Core_Exception(ts('The default mailbox has not been configured. You will find more info in the online user and administrator guide', array( 1 => CRM_Utils_System::url('civicrm/admin/mailSettings', 'reset=1'), - 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/" + 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/", ))); } diff --git a/CRM/Mailing/Event/BAO/Confirm.php b/CRM/Mailing/Event/BAO/Confirm.php index d4560698ba..1f003cd091 100644 --- a/CRM/Mailing/Event/BAO/Confirm.php +++ b/CRM/Mailing/Event/BAO/Confirm.php @@ -57,7 +57,7 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm { * @param string $hash * The hash. * - * @return boolean + * @return bool * True on success */ public static function confirm($contact_id, $subscribe_id, $hash) { diff --git a/CRM/Mailing/Form/Search.php b/CRM/Mailing/Form/Search.php index aaf30ca74d..09de5f3f84 100644 --- a/CRM/Mailing/Form/Search.php +++ b/CRM/Mailing/Form/Search.php @@ -120,7 +120,7 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { 'sms', 'status_unscheduled', 'is_archived', - 'hidden_find_mailings' + 'hidden_find_mailings', ); foreach ($fields as $field) { if (isset($params[$field]) && @@ -128,7 +128,7 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { ) { if (in_array($field, array( 'mailing_from', - 'mailing_to' + 'mailing_to', )) && !$params["mailing_relative"] ) { $time = ($field == 'mailing_to') ? '235959' : NULL; diff --git a/CRM/Mailing/Selector/Event.php b/CRM/Mailing/Selector/Event.php index 3275ff8337..eefd5ede4b 100644 --- a/CRM/Mailing/Selector/Event.php +++ b/CRM/Mailing/Selector/Event.php @@ -261,67 +261,76 @@ class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_C switch ($this->_event_type) { case 'queue': $event = new CRM_Mailing_Event_BAO_Queue(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id ); + return $result; case 'delivered': $event = new CRM_Mailing_Event_BAO_Delivered(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'opened': $event = new CRM_Mailing_Event_BAO_Opened(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'bounce': $event = new CRM_Mailing_Event_BAO_Bounce(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'forward': $event = new CRM_Mailing_Event_BAO_Forward(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'reply': $event = new CRM_Mailing_Event_BAO_Reply(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'unsubscribe': $event = new CRM_Mailing_Event_BAO_Unsubscribe(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct ); + return $result; case 'optout': $event = new CRM_Mailing_Event_BAO_Unsubscribe(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct, FALSE ); + return $result; case 'click': $event = new CRM_Mailing_Event_BAO_TrackableURLOpen(); - return $event->getTotalCount($this->_mailing_id, + $result = $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct, $this->_url_id ); + return $result; default: return 0; @@ -348,59 +357,67 @@ class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_C public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { switch ($this->_event_type) { case 'queue': - return CRM_Mailing_Event_BAO_Queue::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Queue::getRows($this->_mailing_id, $this->_job_id, $offset, $rowCount, $sort ); - break; + return $rows; case 'delivered': - return CRM_Mailing_Event_BAO_Delivered::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Delivered::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort ); + return $rows; case 'opened': - return CRM_Mailing_Event_BAO_Opened::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Opened::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort ); + return $rows; case 'bounce': - return CRM_Mailing_Event_BAO_Bounce::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Bounce::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort ); + return $rows; case 'forward': - return CRM_Mailing_Event_BAO_Forward::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Forward::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort ); + return $rows; case 'reply': - return CRM_Mailing_Event_BAO_Reply::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Reply::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort ); + return $rows; case 'unsubscribe': - return CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort, TRUE ); + return $rows; case 'optout': - return CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id, + $rows = CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id, $this->_job_id, $this->_is_distinct, $offset, $rowCount, $sort, FALSE ); + return $rows; case 'click': - return CRM_Mailing_Event_BAO_TrackableURLOpen::getRows( + $rows = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows( $this->_mailing_id, $this->_job_id, $this->_is_distinct, $this->_url_id, $offset, $rowCount, $sort ); + return $rows; default: return NULL; @@ -413,10 +430,11 @@ class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_C * @param string $output * Type of output. * - * @return string + * @return string|NULL * name of the file */ public function getExportFileName($output = 'csv') { + return NULL; } public function eventToTitle() { @@ -428,17 +446,11 @@ class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_C 'delivered' => ts('Successful Deliveries'), 'bounce' => ts('Bounces'), 'forward' => ts('Forwards'), - 'reply' => $this->_is_distinct - ? ts('Unique Replies') - : ts('Replies'), + 'reply' => $this->_is_distinct ? ts('Unique Replies') : ts('Replies'), 'unsubscribe' => ts('Unsubscribe Requests'), 'optout' => ts('Opt-out Requests'), - 'click' => $this->_is_distinct - ? ts('Unique Click-throughs') - : ts('Click-throughs'), - 'opened' => $this->_is_distinct - ? ts('Unique Tracked Opens') - : ts('Tracked Opens'), + 'click' => $this->_is_distinct ? ts('Unique Click-throughs') : ts('Click-throughs'), + 'opened' => $this->_is_distinct ? ts('Unique Tracked Opens') : ts('Tracked Opens'), ); } return $events[$this->_event_type]; diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index efb7f9da5e..b97050596e 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -512,8 +512,7 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { LEFT JOIN civicrm_activity civireport_activity_all_{$activityType} ON ( civireport_activity_all_{$activityType}.id = civireport_case_activity_all_{$activityType}.activity_id AND civireport_activity_all_{$activityType}.activity_type_id = {$activityType})"; $this->_columnHeaders['case_activity_all_dates'] = array( - 'title' => $this->_caseDetailExtra['case_activity_all_dates']['title'] . - ": {$this->caseActivityTypes[$activityType]}", + 'title' => $this->_caseDetailExtra['case_activity_all_dates']['title'] . ": {$this->caseActivityTypes[$activityType]}", 'type' => CRM_Utils_Array::value('type', $this->_caseDetailExtra['case_activity_all_dates']), ); } diff --git a/CRM/Report/Form/Event/IncomeCountSummary.php b/CRM/Report/Form/Event/IncomeCountSummary.php index 5882a5e77a..0c4e769793 100644 --- a/CRM/Report/Form/Event/IncomeCountSummary.php +++ b/CRM/Report/Form/Event/IncomeCountSummary.php @@ -370,8 +370,7 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form_Event { foreach ($rows as $key => $value) { if ($value['civicrm_event_id']) { $graphRows['totalParticipants'][] = ($rows[$key]['civicrm_line_item_participant_count_count']); - $graphRows[$this->_interval][] = - substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . + $graphRows[$this->_interval][] = substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . $rows[$key]['civicrm_event_id'] . ") "; $graphRows['value'][] = ($rows[$key]['civicrm_line_item_participant_count_count']); } diff --git a/CRM/Report/Form/Event/Summary.php b/CRM/Report/Form/Event/Summary.php index 0a5123fd82..c146b146ec 100644 --- a/CRM/Report/Form/Event/Summary.php +++ b/CRM/Report/Form/Event/Summary.php @@ -242,9 +242,10 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event { return $participant_info; } - //build header for table + /** + * Build header for table. + */ public function buildColumnHeaders() { - $this->_columnHeaders = array(); foreach ($this->_columns as $tableName => $table) { if (array_key_exists('fields', $table)) { @@ -343,8 +344,7 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event { if (!empty($this->_params['charts'])) { foreach ($rows as $key => $value) { $graphRows['totalAmount'][] = $graphRows['value'][] = CRM_Utils_Array::value('totalAmount', $rows[$key]); - $graphRows[$this->_interval][] = - substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . + $graphRows[$this->_interval][] = substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . $rows[$key]['civicrm_event_id'] . ") "; } diff --git a/api/v3/CustomField.php b/api/v3/CustomField.php index bee0711b8d..c207e48457 100644 --- a/api/v3/CustomField.php +++ b/api/v3/CustomField.php @@ -134,13 +134,13 @@ function civicrm_api3_custom_field_get($params) { * @param array $errors * Collect validation errors. * - * @return array + * @return array|NULL * Validation errors * @todo remove this function - not in use but need to review functionality before * removing as it might be useful in wrapper layer */ function _civicrm_api3_custom_field_validate_field($fieldName, $value, $fieldDetails, &$errors = array()) { - return; + return NULL; //see comment block if (!$value) { return $errors; diff --git a/api/v3/MailingJob.php b/api/v3/MailingJob.php index 9d1a702706..0315d351fe 100644 --- a/api/v3/MailingJob.php +++ b/api/v3/MailingJob.php @@ -66,8 +66,8 @@ function _civicrm_api3_mailing_job_create_spec(&$params) { * Array of one or more valid. * * @return array - * API return Array of matching mailing jobs - * {@getfields mailing_job_get} + * API return Array of matching mailing jobs. + * {@getfields mailing_job_get} */ function civicrm_api3_mailing_job_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); diff --git a/bin/deprecated/UpdateAddress.php b/bin/deprecated/UpdateAddress.php index 030aec5ce0..5c67e9eaad 100644 --- a/bin/deprecated/UpdateAddress.php +++ b/bin/deprecated/UpdateAddress.php @@ -273,8 +273,6 @@ WHERE {$whereClause} } } } - - return; } run(); diff --git a/tests/phpunit/CRM/Contribute/AllTests.php b/tests/phpunit/CRM/Contribute/AllTests.php index 269822447d..c8bcca8fa5 100644 --- a/tests/phpunit/CRM/Contribute/AllTests.php +++ b/tests/phpunit/CRM/Contribute/AllTests.php @@ -47,7 +47,7 @@ class CRM_Contribute_AllTests extends CiviTestSuite { */ private static function getInstance() { if (is_null(self::$instance)) { - self::$instance = new self; + self::$instance = new self(); } return self::$instance; } diff --git a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php index 461211f168..244aada927 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php @@ -37,9 +37,9 @@ class CRM_Member_BAO_MembershipStatusTest extends CiviUnitTestCase { parent::setUp(); } - /* check function add() - * - */ + /** + * Check function add() + */ public function testAdd() { $params = array( 'name' => 'pending', diff --git a/tests/phpunit/HelloTest.php b/tests/phpunit/HelloTest.php index 970722131e..a35dc0487b 100644 --- a/tests/phpunit/HelloTest.php +++ b/tests/phpunit/HelloTest.php @@ -47,24 +47,28 @@ class HelloTest extends PHPUnit_Framework_TestCase { var $abc; /** - * @param null $name + * @param string|null $name */ public function __construct($name = NULL) { parent::__construct($name); } - // called before the test functions will be executed - // this function is defined in PHPUnit_TestCase and overwritten - // here + /** + * Called before the test functions will be executed + * this function is defined in PHPUnit_TestCase and overwritten + * here + */ public function setUp() { // create a new instance of String with the // string 'abc' $this->abc = "hello"; } - // called after the test functions are executed - // this function is defined in PHPUnit_TestCase and overwritten - // here + /** + * Called after the test functions are executed + * this function is defined in PHPUnit_TestCase and overwritten + * here. + */ public function tearDown() { // delete your instance unset($this->abc); diff --git a/tests/phpunit/WebTest/Event/PCPAddTest.php b/tests/phpunit/WebTest/Event/PCPAddTest.php index 6c5bec75fb..a5dee0120c 100644 --- a/tests/phpunit/WebTest/Event/PCPAddTest.php +++ b/tests/phpunit/WebTest/Event/PCPAddTest.php @@ -41,7 +41,7 @@ class WebTest_Event_PCPAddTest extends CiviSeleniumTestCase { 'edit-1-profile-listings-and-forms', 'edit-1-access-all-custom-data', 'edit-1-register-for-events', - 'edit-1-make-online-contributions' + 'edit-1-make-online-contributions', ); $this->changePermissions($permission); diff --git a/tests/phpunit/WebTest/Mailing/MailingTest.php b/tests/phpunit/WebTest/Mailing/MailingTest.php index 9a945dcda0..cded96ef4d 100644 --- a/tests/phpunit/WebTest/Mailing/MailingTest.php +++ b/tests/phpunit/WebTest/Mailing/MailingTest.php @@ -230,7 +230,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase { // build forward url $forwardUrl = array( "mailing/forward", - "reset=1&jid={$eventQueue->job_id}&qid={$eventQueue->id}&h={$eventQueue->hash}" + "reset=1&jid={$eventQueue->job_id}&qid={$eventQueue->id}&h={$eventQueue->hash}", ); $this->openCiviPage($forwardUrl[0], $forwardUrl[1], NULL); @@ -433,7 +433,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase { 'Replies', 'Bounces', 'Unsubscribe Requests', - 'Opt-out Requests' + 'Opt-out Requests', ); //check for report and adv search links @@ -448,95 +448,85 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase { $this->verifyText("xpath=//table//tr[td[1]/text()='Subject']/descendant::td[2]", preg_quote("Test subject $mailingName for Webtest")); // after asserts do clicks and confirm filters - $criteriaCheck = - array( - 'Intended Recipients' => - array( - 'report' => array('report_name' => 'Mailing Details', 'Mailing' => "Mailing $mailingName Webtest"), - 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest"), - ), - 'Successful Deliveries' => - array( - 'report' => array( - 'report_name' => 'Mailing Details', - 'Mailing' => "Mailing $mailingName Webtest", - "Delivery Status" => " Successful" - ), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing Delivery -' => "Successful" - ), - ), - 'Tracked Opens' => - array( - 'report' => array('report_name' => 'Mail Opened', 'Mailing' => "Mailing $mailingName Webtest"), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing: Trackable Opens -' => "Opened" - ), - ), - 'Click-throughs' => - array( - 'report' => array('report_name' => 'Mail Clickthroughs', 'Mailing' => "Mailing $mailingName Webtest"), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing: Trackable URL Clicks -' => "Clicked" - ), - ), - 'Forwards' => - array( - 'report' => array( - 'report_name' => 'Mailing Details', - 'Mailing' => "Mailing $mailingName Webtest", - 'Forwarded' => 'Is equal to Yes' - ), - 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Forwards"), - ), - 'Replies' => - array( - 'report' => array( - 'report_name' => 'Mailing Details', - 'Mailing' => "Mailing $mailingName Webtest", - 'Replied' => 'Is equal to Yes' - ), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing: Trackable Replies -' => "Replied" - ), - ), - 'Bounces' => - array( - 'report' => array('report_name' => 'Mail Bounces', 'Mailing' => "Mailing $mailingName Webtest"), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing Delivery -' => "Bounced" - ), - ), - 'Unsubscribe Requests' => - array( - 'report' => array( - 'report_name' => 'Mailing Details', - 'Mailing' => "Mailing $mailingName Webtest", - 'Unsubscribed' => 'Is equal to Yes' - ), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing: -' => "Unsubscribe Requests" - ), - ), - 'Opt-out Requests' => - array( - 'report' => array( - 'report_name' => 'Mailing Details', - 'Mailing' => "Mailing $mailingName Webtest", - 'Opted-out' => 'Is equal to Yes' - ), - 'search' => array( - 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", - 'Mailing: -' => "Opt-out Requests" - ), - ), - ); + $criteriaCheck = array( + 'Intended Recipients' => array( + 'report' => array('report_name' => 'Mailing Details', 'Mailing' => "Mailing $mailingName Webtest"), + 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest"), + ), + 'Successful Deliveries' => array( + 'report' => array( + 'report_name' => 'Mailing Details', + 'Mailing' => "Mailing $mailingName Webtest", + "Delivery Status" => " Successful", + ), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing Delivery -' => "Successful", + ), + ), + 'Tracked Opens' => array( + 'report' => array('report_name' => 'Mail Opened', 'Mailing' => "Mailing $mailingName Webtest"), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing: Trackable Opens -' => "Opened", + ), + ), + 'Click-throughs' => array( + 'report' => array('report_name' => 'Mail Clickthroughs', 'Mailing' => "Mailing $mailingName Webtest"), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing: Trackable URL Clicks -' => "Clicked", + ), + ), + 'Forwards' => array( + 'report' => array( + 'report_name' => 'Mailing Details', + 'Mailing' => "Mailing $mailingName Webtest", + 'Forwarded' => 'Is equal to Yes', + ), + 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Forwards"), + ), + 'Replies' => array( + 'report' => array( + 'report_name' => 'Mailing Details', + 'Mailing' => "Mailing $mailingName Webtest", + 'Replied' => 'Is equal to Yes', + ), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing: Trackable Replies -' => "Replied", + ), + ), + 'Bounces' => array( + 'report' => array('report_name' => 'Mail Bounces', 'Mailing' => "Mailing $mailingName Webtest"), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing Delivery -' => "Bounced", + ), + ), + 'Unsubscribe Requests' => array( + 'report' => array( + 'report_name' => 'Mailing Details', + 'Mailing' => "Mailing $mailingName Webtest", + 'Unsubscribed' => 'Is equal to Yes', + ), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing: -' => "Unsubscribe Requests", + ), + ), + 'Opt-out Requests' => array( + 'report' => array( + 'report_name' => 'Mailing Details', + 'Mailing' => "Mailing $mailingName Webtest", + 'Opted-out' => 'Is equal to Yes', + ), + 'search' => array( + 'Mailing Name IN' => "\"Mailing {$mailingName} Webtest", + 'Mailing: -' => "Opt-out Requests", + ), + ), + ); $this->criteriaCheck($criteriaCheck, $mailingReportUrl); }