Comment fixes
[civicrm-core.git] / CRM / Core / SelectValues.php
index 5a31958955d7d79d8ac90bba503a8d3d13b82f54..40d983c454bd161c3379d38c70c58ceb159fe7b0 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * One place to store frequently used values in Select Elements. Note that
@@ -39,7 +39,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Preferred mail format
-   * @static
+   *
+   * @return array
    */
   public static function pmf() {
     return array(
@@ -51,7 +52,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Privacy options
-   * @static
+   *
+   * @return array
    */
   public static function privacy() {
     return array(
@@ -66,7 +68,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined contact super types
-   * @static
+   *
+   * @return array
    */
   public static function contactType() {
     static $contactType = NULL;
@@ -78,7 +81,9 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined unit list
-   * @static
+   *
+   * @param string $unitType
+   * @return array
    */
   public static function unitList($unitType = NULL) {
     $unitList = array(
@@ -94,7 +99,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Membership type unit
-   * @static
+   *
+   * @return array
    */
   public static function membershipTypeUnitList() {
     return self::unitList('duration');
@@ -102,7 +108,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined period types
-   * @static
+   *
+   * @return array
    */
   public static function periodType() {
     return array(
@@ -113,7 +120,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined email selection methods
-   * @static
+   *
+   * @return array
    */
   public static function emailSelectMethods() {
     return array(
@@ -126,7 +134,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined member visibility options
-   * @static
+   *
+   * @return array
    */
   public static function memberVisibility() {
     return array(
@@ -137,7 +146,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Member auto-renew options
-   * @static
+   *
+   * @return array
    */
   public static function memberAutoRenew() {
     return array(
@@ -149,7 +159,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Various pre defined event dates
-   * @static
+   *
+   * @return array
    */
   public static function eventDate() {
     return array(
@@ -161,7 +172,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Custom form field types
-   * @static
+   *
+   * @return array
    */
   public static function customHtmlType() {
     return array(
@@ -188,7 +200,8 @@ class CRM_Core_SelectValues {
   /**
    * Various pre defined extensions for dynamic properties and groups
    *
-   * @static
+   * @return array
+   *
    */
   public static function customGroupExtends() {
     $customGroupExtends = array(
@@ -217,7 +230,8 @@ class CRM_Core_SelectValues {
   /**
    * Styles for displaying the custom data group
    *
-   * @static
+   * @return array
+   *
    */
   public static function customGroupStyle() {
     return array(
@@ -230,7 +244,7 @@ class CRM_Core_SelectValues {
   /**
    * For displaying the uf group types
    *
-   * @static
+   * @return array
    */
   public static function ufGroupTypes() {
     $ufGroupType = array(
@@ -250,7 +264,8 @@ class CRM_Core_SelectValues {
   /**
    * The status of a contact within a group
    *
-   * @static
+   * @return array
+   *
    */
   public static function groupContactStatus() {
     return array(
@@ -262,7 +277,8 @@ class CRM_Core_SelectValues {
 
   /**
    * List of Group Types
-   * @static
+   *
+   * @return array
    */
   public static function groupType() {
     return array(
@@ -274,18 +290,17 @@ class CRM_Core_SelectValues {
   /**
    * Compose the parameters for a date select object
    *
-   * @param string|NULL $type the type of date
-   * @param string|NULL $format date format ( QF format)
-   *
+   * @param string|NULL $type
+   *   the type of date
+   * @param string|NULL $format
+   *   date format (QF format)
    * @param null $minOffset
    * @param null $maxOffset
    *
    * @return array
    *   the date array
-   * @static
    */
   public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
-
     $date = array(
       'addEmptyOption' => TRUE,
       'emptyOptionText' => ts('- select -'),
@@ -327,7 +342,7 @@ class CRM_Core_SelectValues {
   /**
    * Values for UF form visibility options
    *
-   * @static
+   * @return array
    */
   public static function ufVisibility() {
     return array(
@@ -340,7 +355,7 @@ class CRM_Core_SelectValues {
   /**
    * Values for group form visibility options
    *
-   * @static
+   * @return array
    */
   public static function groupVisibility() {
     return array(
@@ -352,8 +367,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Mailing Components
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function mailingComponents() {
     return array(
@@ -371,8 +385,7 @@ class CRM_Core_SelectValues {
   /**
    * Get hours
    *
-   *
-   * @static
+   * @return array
    */
   public function getHours() {
     $hours = array();
@@ -385,8 +398,7 @@ class CRM_Core_SelectValues {
   /**
    * Get minutes
    *
-   *
-   * @static
+   * @return array
    */
   public function getMinutes() {
     $minutes = array();
@@ -401,7 +413,6 @@ class CRM_Core_SelectValues {
    *
    * @return array
    *   array of map providers
-   * @static
    */
   public static function mapProvider() {
     static $map = NULL;
@@ -416,7 +427,6 @@ class CRM_Core_SelectValues {
    *
    * @return array
    *   array of geocoder providers
-   * @static
    */
   public static function geoProvider() {
     static $geo = NULL;
@@ -427,12 +437,10 @@ class CRM_Core_SelectValues {
   }
 
   /**
-   * Get the Address Standardization Providers from available
-   * plugins
+   * Get the Address Standardization Providers from available plugins
    *
    * @return array
    *   array of address standardization providers
-   * @static
    */
   public static function addressProvider() {
     static $addr = NULL;
@@ -445,8 +453,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Mailing Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function mailingTokens() {
     return array(
@@ -472,8 +479,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Activity Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function activityTokens() {
     return array(
@@ -487,8 +493,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Membership Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function membershipTokens() {
     return array(
@@ -505,8 +510,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Event Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function eventTokens() {
     return array(
@@ -530,8 +534,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Event Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function contributionTokens() {
     return array(
@@ -564,8 +567,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Contact Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function contactTokens() {
     static $tokens = NULL;
@@ -640,8 +642,7 @@ class CRM_Core_SelectValues {
   /**
    * Different type of Participant Tokens
    *
-   * @static
-   * return array
+   * @return array
    */
   public static function participantTokens() {
     static $tokens = NULL;
@@ -682,7 +683,9 @@ class CRM_Core_SelectValues {
   }
 
   /**
-   *  CiviCRM supported date input formats
+   * CiviCRM supported date input formats
+   *
+   * @return array
    */
   public static function getDatePluginInputFormats() {
     $dateInputFormats = array(
@@ -704,23 +707,25 @@ class CRM_Core_SelectValues {
     );
 
     /*
-         Year greater than 2000 get wrong result for following format
-         echo date( 'Y-m-d', strtotime( '7 Nov, 2001') );
-         echo date( 'Y-m-d', strtotime( '7 November, 2001') );
-         Return current year
-         expected :: 2001-11-07
-         output   :: 2009-11-07
-         However
-         echo date( 'Y-m-d', strtotime( 'Nov 7, 2001') );
-         echo date( 'Y-m-d', strtotime( 'November 7, 2001') );
-         gives proper result
-        */
+    Year greater than 2000 get wrong result for following format
+    echo date( 'Y-m-d', strtotime( '7 Nov, 2001') );
+    echo date( 'Y-m-d', strtotime( '7 November, 2001') );
+    Return current year
+    expected :: 2001-11-07
+    output   :: 2009-11-07
+    However
+    echo date( 'Y-m-d', strtotime( 'Nov 7, 2001') );
+    echo date( 'Y-m-d', strtotime( 'November 7, 2001') );
+    gives proper result
+     */
 
     return $dateInputFormats;
   }
 
   /**
    * Map date plugin and actual format that is used by PHP
+   *
+   * @return array
    */
   public static function datePluginToPHPFormats() {
     $dateInputFormats = array(
@@ -745,6 +750,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Time formats
+   *
+   * @return array
    */
   public static function getTimeFormats() {
     return array(
@@ -756,8 +763,10 @@ class CRM_Core_SelectValues {
   /**
    * Get numeric options
    *
+   * @param int $start
+   * @param int $end
    *
-   * @static
+   * @return array
    */
   public static function getNumericOptions($start = 0, $end = 10) {
     $numericOptions = array();
@@ -769,7 +778,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Barcode types
-   * @static
+   *
+   * @return array
    */
   public static function getBarcodeTypes() {
     return array(
@@ -780,6 +790,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Dedupe rule types
+   *
+   * @return array
    */
   public static function getDedupeRuleTypes() {
     return array(
@@ -791,6 +803,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Campaign group types
+   *
+   * @return array
    */
   public static function getCampaignGroupTypes() {
     return array(
@@ -801,6 +815,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Subscription history method
+   *
+   * @return array
    */
   public static function getSubscriptionHistoryMethods() {
     return array(
@@ -813,6 +829,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Premium units
+   *
+   * @return array
    */
   public static function getPremiumUnits() {
     return array(
@@ -825,6 +843,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Extension types
+   *
+   * @return array
    */
   public static function getExtensionTypes() {
     return array(
@@ -838,6 +858,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Job frequency
+   *
+   * @return array
    */
   public static function getJobFrequency() {
     return array(
@@ -849,6 +871,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Search builder operators
+   *
+   * @return array
    */
   public static function getSearchBuilderOperators() {
     return array(
@@ -859,7 +883,9 @@ class CRM_Core_SelectValues {
       '>=' => '≥',
       '<=' => '≤',
       'IN' => ts('In'),
+      'NOT IN' => ts('Not In'),
       'LIKE' => ts('Like'),
+      'NOT LIKE' => ts('Not Like'),
       'RLIKE' => ts('Regex'),
       'IS EMPTY' => ts('Is Empty'),
       'IS NOT EMPTY' => ts('Not Empty'),
@@ -871,7 +897,7 @@ class CRM_Core_SelectValues {
   /**
    * Profile group types
    *
-   * @static
+   * @return array
    */
   public static function getProfileGroupType() {
     $profileGroupType = array(
@@ -890,6 +916,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Word replacement match type
+   *
+   * @return array
    */
   public static function getWordReplacementMatchType() {
     return array(
@@ -900,6 +928,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Mailing group types
+   *
+   * @return array
    */
   public static function getMailingGroupTypes() {
     return array(
@@ -911,6 +941,8 @@ class CRM_Core_SelectValues {
 
   /**
    * Mailing Job Status
+   *
+   * @return array
    */
   public static function getMailingJobStatus() {
     return array(
@@ -922,6 +954,9 @@ class CRM_Core_SelectValues {
     );
   }
 
+  /**
+   * @return array
+   */
   public static function billingMode() {
     return array(
       CRM_Core_Payment::BILLING_MODE_FORM => 'form',
@@ -932,16 +967,19 @@ class CRM_Core_SelectValues {
 
   /**
    * Frequency unit for schedule reminders
+   *
+   * @return array
    */
   public static function getScheduleReminderFrequencyUnits() {
     //@todo update schema to refer to option group direct & remove this
     static $scheduleReminderFrequencyUnits = NULL;
     if (!$scheduleReminderFrequencyUnits) {
       $scheduleReminderFrequencyUnits = array(
-          'hour' => ts('hour')
-        ) + CRM_Core_OptionGroup::values('recur_frequency_units');
+        'hour' => ts('hour'),
+      ) + CRM_Core_OptionGroup::values('recur_frequency_units');
     }
 
     return $scheduleReminderFrequencyUnits;
   }
+
 }