INFRA-132 - s/true/TRUE/
[civicrm-core.git] / CRM / Contact / Form / Search / Builder.php
index 614ee325d89e8d2e4c7881784ee2c6b3c914c0d5..e9850f164c32298d5094d39d2a0d10d9c0c0de32 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -42,7 +42,6 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * Number of columns in where
    *
    * @var int
-   * @access public
    */
   public $_columnCount;
 
@@ -50,7 +49,6 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * Number of blocks to be shown
    *
    * @var int
-   * @access public
    */
   public $_blockCount;
 
@@ -58,7 +56,6 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * Build the form object
    *
    * @return void
-   * @access public
    */
   public function preProcess() {
     $this->set('searchFormName', 'Builder');
@@ -128,11 +125,10 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
   /**
    * Add local and global form rules
    *
-   * @access protected
    *
    * @return void
    */
-  function addRules() {
+  public function addRules() {
     $this->addFormRule(array('CRM_Contact_Form_Search_Builder', 'formRule'), $this);
   }
 
@@ -145,9 +141,8 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    *
    * @return array list of errors to be posted back to the form
    * @static
-   * @access public
    */
-  static function formRule($values, $files, $self) {
+  public static function formRule($values, $files, $self) {
     if (!empty($values['addMore']) || !empty($values['addBlock'])) {
       return TRUE;
     }
@@ -322,7 +317,6 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * Process the uploaded file
    *
    * @return void
-   * @access public
    */
   public function postProcess() {
     $this->set('isAdvanced', '2');
@@ -409,7 +403,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
   /**
    * @return array
    */
-  static function fields() {
+  public static function fields() {
     $fields = array_merge(
       CRM_Contact_BAO_Contact::exportableFields('All', FALSE, TRUE),
       CRM_Core_Component::getQueryFields(),
@@ -425,7 +419,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * @return array: (string => string) key: field_name value: api entity name
    * Note: options are fetched via ajax using the api "getoptions" method
    */
-  static function fieldOptions() {
+  public static function fieldOptions() {
     // Hack to add options not retrieved by getfields
     // This list could go on and on, but it would be better to fix getfields
     $options = array(
@@ -474,21 +468,20 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
    * CRM-10338
    * tags and groups use array keys for selection list.
    * if using IS NULL/NOT NULL, an array with no array key is created
-   * convert that to simple null so processing can proceed
+   * convert that to simple NULL so processing can proceed
    */
-  static function checkArrayKeyEmpty($val) {
+  public static function checkArrayKeyEmpty($val) {
     if (is_array($val)) {
-      $v2empty = true;
+      $v2empty = TRUE;
       foreach ($val as $vk => $vv) {
         if (!empty($vk)) {
           $v2empty = false;
         }
       }
       if ($v2empty) {
-        $val = null;
+        $val = NULL;
       }
     }
     return $val;
   }
 }
-