Merge pull request #4983 from colemanw/CRM-15842
[civicrm-core.git] / CRM / Mailing / PseudoConstant.php
index d4ffa68d3db070de11d1ed9c1f74f4eca4010a66..4b7750c227b1976cef46ea69f9c1dc925971166e 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -42,21 +42,18 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Mailing templates
    * @var array
-   * @static
    */
   private static $template;
 
   /**
    * Completed mailings
    * @var array
-   * @static
    */
   private static $completed;
 
   /**
    * Mailing components
    * @var array
-   * @static
    */
   private static $component;
 
@@ -68,11 +65,11 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the mailing components of a particular type
    *
-   * @param $type the type of component needed
-   * @access public
+   * @param $type
+   *   The type of component needed.
    *
-   * @return array - array reference of all mailing components
-   * @static
+   * @return array
+   *   array reference of all mailing components
    */
   public static function &component($type = NULL) {
     $name = $type ? $type : 'ALL';
@@ -89,7 +86,6 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
         // we need to add an additional filter for $type
         self::$component[$name] = array();
 
-
         $object = new CRM_Mailing_DAO_Component();
         $object->component_type = $type;
         $object->selectAdd();
@@ -108,12 +104,13 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Determine the default mailing component of a given type
    *
-   * @param $type the type of component needed
-   * @param $undefined the value to use if no default is defined
-   * @access public
+   * @param $type
+   *   The type of component needed.
+   * @param $undefined
+   *   The value to use if no default is defined.
    *
-   * @return integer -The ID of the default mailing component.
-   * @static
+   * @return int
+   *   The ID of the default mailing component.
    */
   public static function &defaultComponent($type, $undefined = NULL) {
     if (!self::$defaultComponent) {
@@ -137,10 +134,9 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the mailing templates
    *
-   * @access public
    *
-   * @return array - array reference of all mailing templates if any
-   * @static
+   * @return array
+   *   array reference of all mailing templates if any
    */
   public static function &template() {
     if (!self::$template) {
@@ -152,12 +148,11 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
   /**
    * Get all the completed mailing
    *
-   * @access public
    *
    * @param null $mode
    *
-   * @return array - array reference of all mailing templates if any
-   * @static
+   * @return array
+   *   array reference of all mailing templates if any
    */
   public static function &completed($mode = NULL) {
     if (!self::$completed) {
@@ -187,19 +182,24 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
     if (!$options) {
       $options = array(
         'bounce' => array(
-          'N' => ts('Successful '), 'Y' => ts('Bounced '),
+          'N' => ts('Successful '),
+          'Y' => ts('Bounced '),
         ),
         'delivered' => array(
-          'Y' => ts('Successful '), 'N' => ts('Bounced '),
+          'Y' => ts('Successful '),
+          'N' => ts('Bounced '),
         ),
         'open' => array(
-          'Y' => ts('Opened '), 'N' => ts('Unopened/Hidden '),
+          'Y' => ts('Opened '),
+          'N' => ts('Unopened/Hidden '),
         ),
         'click' => array(
-          'Y' => ts('Clicked '), 'N' => ts('Not Clicked '),
+          'Y' => ts('Clicked '),
+          'N' => ts('Not Clicked '),
         ),
         'reply' => array(
-          'Y' => ts('Replied '), 'N' => ts('No Reply '),
+          'Y' => ts('Replied '),
+          'N' => ts('No Reply '),
         ),
       );
     }
@@ -210,15 +210,13 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
    * Flush given pseudoconstant so it can be reread from db
    * next time it's requested.
    *
-   * @access public
-   * @static
    *
    * @param bool|string $name pseudoconstant to be flushed
    */
   public static function flush($name = 'template') {
-   if (isset(self::$$name)) {
+    if (isset(self::$$name)) {
       self::$$name = NULL;
     }
   }
-}
 
+}