INFRA-132 - CRM/Event - phpcbf
[civicrm-core.git] / CRM / Contact / Selector / Custom.php
index 15fe2948022049ca040b14323a3fb9f38bd1460d..1bd4f4c1bc99d3f94f3067553db5afb05be05b50 100644 (file)
@@ -106,8 +106,10 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
    * Class constructor
    *
    * @param $customSearchClass
-   * @param array $formValues array of form values imported
-   * @param array $params array of parameters for query
+   * @param array $formValues
+   *   Array of form values imported.
+   * @param array $params
+   *   Array of parameters for query.
    * @param null $returnProperties
    * @param \const|int $action - action of search basic or advanced.
    *
@@ -121,14 +123,14 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
    */
   function __construct(
     $customSearchClass,
-    $formValues        = NULL,
-    $params            = NULL,
-    $returnProperties  = NULL,
-    $action            = CRM_Core_Action::NONE,
+    $formValues = NULL,
+    $params = NULL,
+    $returnProperties = NULL,
+    $action = CRM_Core_Action::NONE,
     $includeContactIds = FALSE,
     $searchChildGroups = TRUE,
-    $searchContext     = 'search',
-    $contextMenu       = NULL
+    $searchContext = 'search',
+    $contextMenu = NULL
   ) {
     $this->_customSearchClass = $customSearchClass;
     $this->_formValues = $formValues;
@@ -139,10 +141,10 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
     if (!$ext->isExtensionKey($customSearchClass)) {
       if ($ext->isExtensionClass($customSearchClass)) {
         $customSearchFile = $ext->classToPath($customSearchClass);
-        require_once ($customSearchFile);
+        require_once $customSearchFile;
       }
       else {
-        require_once (str_replace('_', DIRECTORY_SEPARATOR, $customSearchClass) . '.php');
+        require_once str_replace('_', DIRECTORY_SEPARATOR, $customSearchClass) . '.php';
       }
       $this->_search = new $customSearchClass( $formValues );
     }
@@ -221,8 +223,10 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
    * Returns the column headers as an array of tuples:
    * (name, sortName (key to the sort array))
    *
-   * @param string $action the action being performed
-   * @param enum   $output what should the result set include (web/email/csv)
+   * @param string $action
+   *   The action being performed.
+   * @param enum $output
+   *   What should the result set include (web/email/csv).
    *
    * @return array the column headers that need to be displayed
    */
@@ -263,11 +267,16 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
   /**
    * Returns all the rows in the given offset and rowCount
    *
-   * @param enum   $action   the action being performed
-   * @param int    $offset   the row number to start from
-   * @param int    $rowCount the number of rows to return
-   * @param string $sort     the sql string that describes the sort order
-   * @param enum   $output   what should the result set include (web/email/csv)
+   * @param enum $action
+   *   The action being performed.
+   * @param int $offset
+   *   The row number to start from.
+   * @param int $rowCount
+   *   The number of rows to return.
+   * @param string $sort
+   *   The sql string that describes the sort order.
+   * @param enum $output
+   *   What should the result set include (web/email/csv).
    *
    * @return int   the total number of rows for this action
    */
@@ -351,8 +360,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
         }
 
         if ($image) {
-          $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($dao->contact_sub_type ?
-            $dao->contact_sub_type : $dao->contact_type, FALSE, $contactID
+          $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($dao->contact_sub_type ? $dao->contact_sub_type : $dao->contact_type, FALSE, $contactID
           );
         }
         $rows[] = $row;
@@ -368,8 +376,8 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
    * Given the current formValues, gets the query in local
    * language
    *
-   * @param  array(
-     reference)   $formValues   submitted formValues
+   * @param array(
+  reference)   $formValues   submitted formValues
    *
    * @return array              $qill         which contains an array of strings
    */
@@ -387,7 +395,8 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
   /**
    * Name of export file.
    *
-   * @param string $output type of output
+   * @param string $output
+   *   Type of output.
    *
    * @return string name of the file
    */