INFRA-132 - CRM/Contact - Convert single-line @param to multi-line
[civicrm-core.git] / CRM / Contact / BAO / SavedSearch.php
index 2581794f36f6809f00d9b141d23e8c540fc15325..782b1f7c0592627ab19bddbb321b240fc1f58a3c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -44,7 +44,7 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return \CRM_Contact_BAO_SavedSearch CRM_Contact_BAO_SavedSearch
    */
-  function __construct() {
+  public function __construct() {
     parent::__construct();
   }
 
@@ -53,9 +53,8 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return array $aSavedSearch - contains the search name as value and and id as key
    *
-   * @access public
    */
-  function getAll() {
+  public function getAll() {
     $savedSearch = new CRM_Contact_DAO_SavedSearch();
     $savedSearch->selectAdd();
     $savedSearch->selectAdd('id, name');
@@ -70,14 +69,15 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    * Takes a bunch of params that are needed to match certain criteria and
    * retrieves the relevant objects.
    *
-   * @param array $params   (reference ) an assoc array of name/value pairs
-   * @param array $defaults (reference ) an assoc array to hold the flattened values
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
+   * @param array $defaults
+   *   (reference ) an assoc array to hold the flattened values.
    *
    * @return CRM_Contact_BAO_SavedSearch
-   * @access public
    * @static
    */
-  static function retrieve(&$params, &$defaults) {
+  public static function retrieve(&$params, &$defaults) {
     $savedSearch = new CRM_Contact_DAO_SavedSearch();
     $savedSearch->copyValues($params);
     if ($savedSearch->find(TRUE)) {
@@ -90,13 +90,13 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
   /**
    * Given an id, extract the formValues of the saved search
    *
-   * @param int $id the id of the saved search
+   * @param int $id
+   *   The id of the saved search.
    *
    * @return array the values of the posted saved search
-   * @access public
    * @static
    */
-  static function &getFormValues($id) {
+  public static function &getFormValues($id) {
     $fv = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $id, 'form_values');
     $result = NULL;
     if ($fv) {
@@ -135,7 +135,7 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return array
    */
-  static function getSearchParams($id) {
+  public static function getSearchParams($id) {
     $fv = self::getFormValues($id);
     //check if the saved search has mapping id
     if (CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $id, 'mapping_id')) {
@@ -152,15 +152,17 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
   /**
    * Get the where clause for a saved search
    *
-   * @param int $id saved search id
-   * @param  array $tables (reference ) add the tables that are needed for the select clause
-   * @param  array $whereTables (reference ) add the tables that are needed for the where clause
+   * @param int $id
+   *   Saved search id.
+   * @param array $tables
+   *   (reference ) add the tables that are needed for the select clause.
+   * @param array $whereTables
+   *   (reference ) add the tables that are needed for the where clause.
    *
    * @return string the where clause for this saved search
-   * @access public
    * @static
    */
-  static function whereClause($id, &$tables, &$whereTables) {
+  public static function whereClause($id, &$tables, &$whereTables) {
     $params = self::getSearchParams($id);
     if ($params) {
       if (!empty($params['customSearchID'])) {
@@ -177,7 +179,7 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
    *
    * @return string
    */
-  static function contactIDsSQL($id) {
+  public static function contactIDsSQL($id) {
     $params = self::getSearchParams($id);
     if ($params && !empty($params['customSearchID'])) {
       return CRM_Contact_BAO_SearchCustom::contactIDSQL(NULL, $id);
@@ -201,7 +203,7 @@ WHERE  $where";
    *
    * @return array
    */
-  static function fromWhereEmail($id) {
+  public static function fromWhereEmail($id) {
     $params = self::getSearchParams($id);
 
     if ($params) {
@@ -232,7 +234,7 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
    * Given a saved search compute the clause and the tables
    * and store it for future use
    */
-  function buildClause() {
+  public function buildClause() {
     $fv = unserialize($this->form_values);
 
     if ($this->mapping_id) {
@@ -256,7 +258,7 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
     return;
   }
 
-  function save() {
+  public function save() {
     // first build the computed fields
     $this->buildClause();
 
@@ -266,15 +268,15 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
   /**
    * Given an id, get the name of the saved search
    *
-   * @param int $id the id of the saved search
+   * @param int $id
+   *   The id of the saved search.
    *
    * @param string $value
    *
    * @return string the name of the saved search
-   * @access public
    * @static
    */
-  static function getName($id, $value = 'name') {
+  public static function getName($id, $value = 'name') {
     $group = new CRM_Contact_DAO_Group();
     $group->saved_search_id = $id;
     if ($group->find(TRUE)) {
@@ -287,7 +289,7 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
    * Given a label and a set of normalized POST
    * formValues, create a smart group with that
    */
-  static function create(&$params) {
+  public static function create(&$params) {
     $savedSearch = new CRM_Contact_DAO_SavedSearch();
     if (isset($params['formValues']) &&
       !empty($params['formValues'])
@@ -308,4 +310,3 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
     return $savedSearch;
   }
 }
-