Merge branch 'master' of github.com:civicrm/civicrm-core into code-cleanup-batch-15
[civicrm-core.git] / CRM / Mailing / Event / BAO / Reply.php
index cac6deb61a7f8d7fdb8ef3e21b9b50ab99c834e6..24bff5a3d3569be41f9929bb30a1994b798d26ce 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -44,24 +44,26 @@ require_once 'ezc/autoload/mail_autoload.php';
 class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
 
   /**
-   * class constructor
+   * Class constructor
    */
-  function __construct() {
+  public function __construct() {
     parent::__construct();
   }
 
   /**
    * Register a reply event.
    *
-   * @param int $job_id The job ID of the reply
-   * @param int $queue_id The queue event id
-   * @param string $hash The hash
+   * @param int $job_id
+   *   The job ID of the reply.
+   * @param int $queue_id
+   *   The queue event id.
+   * @param string $hash
+   *   The hash.
    *
    * @param null $replyto
    *
-   * @return object|null      The mailing object, or null on failure
-   * @access public
-   * @static
+   * @return object|null
+   *   The mailing object, or null on failure
    */
   public static function &reply($job_id, $queue_id, $hash, $replyto = NULL) {
     /* First make sure there's a matching queue event */
@@ -103,16 +105,20 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
   /**
    * Forward a mailing reply
    *
-   * @param int $queue_id     Queue event ID of the sender
-   * @param string $mailing   The mailing object
-   * @param string $bodyTxt   text part of the body (ignored if $fullEmail provided)
-   * @param string $replyto   Reply-to of the incoming message
-   * @param string $bodyHTML  HTML part of the body (ignored if $fullEmail provided)
-   * @param string $fullEmail whole email to forward in one string
+   * @param int $queue_id
+   *   Queue event ID of the sender.
+   * @param string $mailing
+   *   The mailing object.
+   * @param string $bodyTxt
+   *   Text part of the body (ignored if $fullEmail provided).
+   * @param string $replyto
+   *   Reply-to of the incoming message.
+   * @param string $bodyHTML
+   *   HTML part of the body (ignored if $fullEmail provided).
+   * @param string $fullEmail
+   *   Whole email to forward in one string.
    *
    * @return void
-   * @access public
-   * @static
    */
   public static function send($queue_id, &$mailing, &$bodyTxt, $replyto, &$bodyHTML = NULL, &$fullEmail = NULL) {
     $domain = CRM_Core_BAO_Domain::getDomain();
@@ -207,13 +213,14 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
   /**
    * Send an automated response
    *
-   * @param object $mailing       The mailing object
-   * @param int $queue_id         The queue ID
-   * @param string $replyto       Optional reply-to from the reply
+   * @param object $mailing
+   *   The mailing object.
+   * @param int $queue_id
+   *   The queue ID.
+   * @param string $replyto
+   *   Optional reply-to from the reply.
    *
    * @return void
-   * @access private
-   * @static
    */
   private static function autoRespond(&$mailing, $queue_id, $replyto) {
     $config = CRM_Core_Config::singleton();
@@ -297,15 +304,18 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
   /**
    * Get row count for the event selector
    *
-   * @param int $mailing_id       ID of the mailing
-   * @param int $job_id           Optional ID of a job to filter on
-   * @param boolean $is_distinct  Group by queue ID?
+   * @param int $mailing_id
+   *   ID of the mailing.
+   * @param int $job_id
+   *   Optional ID of a job to filter on.
+   * @param bool $is_distinct
+   *   Group by queue ID?.
    *
-   * @return int                  Number of rows in result set
-   * @access public
-   * @static
+   * @return int
+   *   Number of rows in result set
    */
-  public static function getTotalCount($mailing_id, $job_id = NULL,
+  public static function getTotalCount(
+    $mailing_id, $job_id = NULL,
     $is_distinct = FALSE
   ) {
     $dao = new CRM_Core_DAO();
@@ -348,18 +358,24 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
   /**
    * Get rows for the event browser
    *
-   * @param int $mailing_id       ID of the mailing
-   * @param int $job_id           optional ID of the job
-   * @param boolean $is_distinct  Group by queue id?
-   * @param int $offset           Offset
-   * @param int $rowCount         Number of rows
-   * @param array $sort           sort array
+   * @param int $mailing_id
+   *   ID of the mailing.
+   * @param int $job_id
+   *   Optional ID of the job.
+   * @param bool $is_distinct
+   *   Group by queue id?.
+   * @param int $offset
+   *   Offset.
+   * @param int $rowCount
+   *   Number of rows.
+   * @param array $sort
+   *   Sort array.
    *
-   * @return array                Result set
-   * @access public
-   * @static
+   * @return array
+   *   Result set
    */
-  public static function &getRows($mailing_id, $job_id = NULL,
+  public static function &getRows(
+    $mailing_id, $job_id = NULL,
     $is_distinct = FALSE, $offset = NULL, $rowCount = NULL, $sort = NULL
   ) {
 
@@ -434,4 +450,3 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
     return $results;
   }
 }
-