INFRA-132 - Remove @static annotation
[civicrm-core.git] / CRM / Contact / Form / Search.php
index ef4560524dcf8974e42ed526c3a6261e709620ac..a0f849701eb4cc961f5ab7b589860ebd60a73bad 100644 (file)
  */
 class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
 
-  /*
+  /**
    * list of valid contexts
    *
    * @var array
-   * @static
    */
   static $_validContext = NULL;
 
@@ -55,7 +54,6 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
    * List of values used when we want to display other objects
    *
    * @var array
-   * @static
    */
   static $_modeValues = NULL;
 
@@ -137,7 +135,6 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
    * Csv - common search values
    *
    * @var array
-   * @static
    */
   static $csv = array('contact_type', 'group', 'tag');
 
@@ -166,8 +163,8 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   /**
    * Define the set of valid contexts that the search form operates on
    *
-   * @return array the valid context set and the titles
-   * @static
+   * @return array
+   *   the valid context set and the titles
    */
   public static function &validContext() {
     if (!(self::$_validContext)) {
@@ -416,8 +413,8 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
 
     // add the go button for the action form, note it is of type 'next' rather than of type 'submit'
     if ($this->_context === 'amtg') {
-        // check if _groupID exists, it might not if
-        // we are displaying a hidden group
+      // check if _groupID exists, it might not if
+      // we are displaying a hidden group
       if (!isset($this->_group[$this->_amtgID])) {
         $this->assign('permissionedForGroup', FALSE);
         $this->_group[$this->_amtgID] =
@@ -602,11 +599,17 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
         // FIXME: we should generalise in a way that components could inject url-filters
         // just like they build their own form elements
         foreach (array(
-          'mailing_id', 'mailing_delivery_status', 'mailing_open_status',
-          'mailing_click_status', 'mailing_reply_status', 'mailing_optout',
-          'mailing_forward', 'mailing_unsubscribe', 'mailing_date_low',
-          'mailing_date_high',
-          ) as $mailingFilter) {
+                   'mailing_id',
+                   'mailing_delivery_status',
+                   'mailing_open_status',
+                   'mailing_click_status',
+                   'mailing_reply_status',
+                   'mailing_optout',
+                   'mailing_forward',
+                   'mailing_unsubscribe',
+                   'mailing_date_low',
+                   'mailing_date_high',
+                 ) as $mailingFilter) {
           $type = 'String';
           if ($mailingFilter == 'mailing_id' &&
             $filterVal = CRM_Utils_Request::retrieve('mailing_id', 'Positive', $this)
@@ -739,7 +742,8 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
     $crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer', CRM_Core_DAO::$_nullObject);
 
     if (array_key_exists($this->_searchButtonName, $_POST) ||
-      ($this->_force && !$crmPID)) {
+      ($this->_force && !$crmPID)
+    ) {
       //reset the cache table for new search
       $cacheKey = "civicrm search {$this->controller->_key}";
       CRM_Core_BAO_PrevNextCache::deleteItem(NULL, $cacheKey);