Merge pull request #4606 from johanv/CRM-15636-price_set_event_and_contribution
[civicrm-core.git] / CRM / Activity / BAO / ICalendar.php
index 13212cc107e762b1ccc87aebe6ab28448f52463e..901bfe9d18d03e90a1ce63a03655af38d24618d3 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -49,10 +49,10 @@ class CRM_Activity_BAO_ICalendar {
    *
    * @param object $act Reference to an activity object
    *
-   * @return void
-   * @access public
+   * @return \CRM_Activity_BAO_ICalendar
+  @access public
    */
-  function __construct( &$act ) {
+  public function __construct( &$act ) {
     $this->activity = $act;
   }
 
@@ -63,9 +63,8 @@ class CRM_Activity_BAO_ICalendar {
    * @param array $contacts     Array of contacts (attendees)
    *
    * @return string   Array index of the added attachment in the $attachments array, or else null.
-   * @access public
    */
-  function addAttachment( &$attachments, $contacts ) {
+  public function addAttachment( &$attachments, $contacts ) {
     // Check preferences setting
     if ( CRM_Core_BAO_Setting::getItem( CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'activity_assignee_notification_ics' ) ) {
       $config = &CRM_Core_Config::singleton();
@@ -102,13 +101,16 @@ class CRM_Activity_BAO_ICalendar {
     return null;
   }
 
-  function cleanup() {
+  public function cleanup() {
     if ( !empty ( $this->icsfile ) ) {
       @unlink( $this->icsfile );
     }
   }
 
   // TODO: Is there a better way to do this?
+  /**
+   * @return string
+   */
   private function getPrimaryEmail() {
     $session = &CRM_Core_Session::singleton();
     $uid = $session->get('userID');
@@ -130,4 +132,3 @@ class CRM_Activity_BAO_ICalendar {
     return $primary;
   }
 }
-