}
$options = _civicrm_api3_get_options_from_params($params, TRUE, 'contribution', 'get');
$fnName = '_civicrm_api3_mailing_contact_get_' . strtolower($params['type']);
+ if (!function_exists($fnName)) {
+ throw new API_Exception('Invalid mailing type: ' . $params['type']);
+ }
return $fnName(
$params['contact_id'],
$options['offset'],
* Helper function for mailing contact queries.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $selectFields
- * @param $fromClause
- * @param $whereClause
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param array|null $selectFields
+ * @param string|null $fromClause
+ * @param string|null $whereClause
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/
* Get delivered mailing contacts.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/
* Get bounced mailing contact records.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/