INFRA-132 - Remove @static annotation
[civicrm-core.git] / CRM / Mailing / Event / BAO / Confirm.php
index 00fed2d2a3bed1cca3bfcec381618d1394621f77..d4560698ba0d9d448e6a74aa732647232b9cd9a4 100644 (file)
@@ -43,20 +43,22 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
   /**
    * Class constructor
    */
-  function __construct() {
+  public function __construct() {
     parent::__construct();
   }
 
   /**
    * Confirm a pending subscription
    *
-   * @param int $contact_id       The id of the contact
-   * @param int $subscribe_id     The id of the subscription event
-   * @param string $hash          The hash
+   * @param int $contact_id
+   *   The id of the contact.
+   * @param int $subscribe_id
+   *   The id of the subscription event.
+   * @param string $hash
+   *   The hash.
    *
-   * @return boolean              True on success
-   * @access public
-   * @static
+   * @return boolean
+   *   True on success
    */
   public static function confirm($contact_id, $subscribe_id, $hash) {
     $se = &CRM_Mailing_Event_BAO_Subscribe::verify(
@@ -129,10 +131,10 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
       $text = CRM_Utils_String::htmlToText($component->body_html);
     }
 
-    $bao            = new CRM_Mailing_BAO_Mailing();
+    $bao = new CRM_Mailing_BAO_Mailing();
     $bao->body_text = $text;
     $bao->body_html = $html;
-    $tokens         = $bao->getTokens();
+    $tokens = $bao->getTokens();
 
     $html = CRM_Utils_Token::replaceDomainTokens($html, $domain, TRUE, $tokens['html']);
     $html = CRM_Utils_Token::replaceWelcomeTokens($html, $group->title, TRUE);
@@ -141,7 +143,8 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
     $text = CRM_Utils_Token::replaceWelcomeTokens($text, $group->title, FALSE);
 
     $mailParams = array(
-      'groupName' => 'Mailing Event ' . $component->component_type, 'subject' => $component->subject,
+      'groupName' => 'Mailing Event ' . $component->component_type,
+      'subject' => $component->subject,
       'from' => "\"$domainEmailName\" <do-not-reply@$emailDomain>",
       'toEmail' => $email,
       'toName' => $display_name,
@@ -156,4 +159,3 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
     return $group->title;
   }
 }
-