QA fixes Round 2
[civicrm-core.git] / CRM / Core / SelectValues.php
index 1d8812ba1ce011457a06c13d4d45993b544a2048..f08f5fb8f031fdffe8a55f4d2dfaea3aad28eb83 100644 (file)
@@ -96,7 +96,7 @@ class CRM_Core_SelectValues {
    * Membership type unit
    * @static
    */
-  public static function membershipTypeUnitList( ) {
+  public static function membershipTypeUnitList() {
     return self::unitList('duration');
   }
 
@@ -120,7 +120,7 @@ class CRM_Core_SelectValues {
       'automatic' => ts("Automatic"),
       'location-only' => ts("Only send to email addresses assigned to the specified location"),
       'location-prefer' => ts("Prefer email addresses assigned to the specified location"),
-      'location-exclude' => ts("Exclude email addresses assigned to the specified location")
+      'location-exclude' => ts("Exclude email addresses assigned to the specified location"),
     );
   }
 
@@ -143,7 +143,7 @@ class CRM_Core_SelectValues {
     return array(
       ts('No auto-renew option'),
       ts('Give option, but not required'),
-      ts('Auto-renew required')
+      ts('Auto-renew required'),
     );
   }
 
@@ -274,13 +274,14 @@ 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
+   * @return array
+   *   the date array
    * @static
    */
   public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
@@ -355,7 +356,8 @@ class CRM_Core_SelectValues {
    * return array
    */
   public static function mailingComponents() {
-    return array('Header' => ts('Header'),
+    return array(
+      'Header' => ts('Header'),
       'Footer' => ts('Footer'),
       'Reply' => ts('Reply Auto-responder'),
       'OptOut' => ts('Opt-out Message'),
@@ -397,7 +399,8 @@ class CRM_Core_SelectValues {
   /**
    * Get the Map Provider
    *
-   * @return array $map array of map providers
+   * @return array
+   *   array of map providers
    * @static
    */
   public static function mapProvider() {
@@ -411,7 +414,8 @@ class CRM_Core_SelectValues {
   /**
    * Get the Geocoding Providers from available plugins
    *
-   * @return array $geo array of geocoder providers
+   * @return array
+   *   array of geocoder providers
    * @static
    */
   public static function geoProvider() {
@@ -426,7 +430,8 @@ class CRM_Core_SelectValues {
    * Get the Address Standardization Providers from available
    * plugins
    *
-   * @return array $addr array of address standardization providers
+   * @return array
+   *   array of address standardization providers
    * @static
    */
   public static function addressProvider() {
@@ -518,7 +523,7 @@ class CRM_Core_SelectValues {
       '{event.fee_amount}' => ts('Event Fees'),
       '{event.info_url}' => ts('Event Info URL'),
       '{event.registration_url}' => ts('Event Registration URL'),
-      '{event.balance}' => ts('Event Balance')
+      '{event.balance}' => ts('Event Balance'),
     );
   }
 
@@ -565,7 +570,8 @@ class CRM_Core_SelectValues {
   public static function contactTokens() {
     static $tokens = NULL;
     if (!$tokens) {
-      $additionalFields = array('checksum' => array('title' => ts('Checksum')),
+      $additionalFields = array(
+        'checksum' => array('title' => ts('Checksum')),
         'contact_id' => array('title' => ts('Internal Contact ID')),
       );
       $exportFields = array_merge(CRM_Contact_BAO_Contact::exportableFields(), $additionalFields);
@@ -575,8 +581,16 @@ class CRM_Core_SelectValues {
 
       //FIXME:skipping some tokens for time being.
       $skipTokens = array(
-        'is_bulkmail', 'group', 'tag', 'contact_sub_type', 'note',
-        'is_deceased', 'deceased_date', 'legal_identifier', 'contact_sub_type', 'user_unique_id',
+        'is_bulkmail',
+        'group',
+        'tag',
+        'contact_sub_type',
+        'note',
+        'is_deceased',
+        'deceased_date',
+        'legal_identifier',
+        'contact_sub_type',
+        'user_unique_id',
       );
 
       $customFields = CRM_Core_BAO_CustomField::getFields(array('Individual', 'Address'));
@@ -639,8 +653,14 @@ class CRM_Core_SelectValues {
 
       // skipping some tokens for time being.
       $skipTokens = array(
-        'event_id', 'participant_is_pay_later', 'participant_is_test', 'participant_contact_id',
-        'participant_fee_currency', 'participant_campaign_id', 'participant_status', 'participant_discount_name',
+        'event_id',
+        'participant_is_pay_later',
+        'participant_is_test',
+        'participant_contact_id',
+        'participant_fee_currency',
+        'participant_campaign_id',
+        'participant_status',
+        'participant_discount_name',
       );
 
       $customFields = CRM_Core_BAO_CustomField::getFields('Participant');
@@ -696,7 +716,6 @@ class CRM_Core_SelectValues {
          gives proper result
         */
 
-
     return $dateInputFormats;
   }
 
@@ -743,7 +762,7 @@ class CRM_Core_SelectValues {
   public static function getNumericOptions($start = 0, $end = 10) {
     $numericOptions = array();
     for ($i = $start; $i <= $end; $i++) {
-        $numericOptions[$i] = $i;
+      $numericOptions[$i] = $i;
     }
     return $numericOptions;
   }
@@ -808,7 +827,7 @@ class CRM_Core_SelectValues {
    * Extension types
    */
   public static function getExtensionTypes() {
-    return  array(
+    return array(
       'payment' => ts('Payment'),
       'search' => ts('Search'),
       'report' => ts('Report'),
@@ -840,7 +859,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'),
@@ -863,7 +884,7 @@ class CRM_Core_SelectValues {
     );
     $contactTypes = self::contactType();
     $contactTypes = !empty($contactTypes) ? array('Contact' => 'Contacts') + $contactTypes : array();
-    $profileGroupType = array_merge($contactTypes, $profileGroupType );
+    $profileGroupType = array_merge($contactTypes, $profileGroupType);
 
     return $profileGroupType;
   }
@@ -874,9 +895,9 @@ class CRM_Core_SelectValues {
    */
   public static function getWordReplacementMatchType() {
     return array(
-        'exactMatch' => ts('Exact Match'),
-        'wildcardMatch' => ts('Wildcard Match'),
-      );
+      'exactMatch' => ts('Exact Match'),
+      'wildcardMatch' => ts('Wildcard Match'),
+    );
   }
 
   /**
@@ -919,7 +940,8 @@ class CRM_Core_SelectValues {
     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;