INFRA-132 - Convert // comments to docblocks
[civicrm-core.git] / CRM / Contact / Form / Search / Custom / ContributionAggregate.php
index ab2f2c065513b40e16b71cac85d7ca92f3976b24..244b4c6d8d6aa7cc545898cb26845c01b4076b5c 100644 (file)
@@ -40,12 +40,10 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac
   /**
    * @param $formValues
    */
-  function __construct(&$formValues) {
+  public function __construct(&$formValues) {
     $this->_formValues = $formValues;
-    /**
-     * Define the columns for search result rows
-     */
 
+    // Define the columns for search result rows
     $this->_columns = array(
       ts('Contact ID') => 'contact_id',
       ts('Name') => 'sort_name',
@@ -60,7 +58,7 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac
   /**
    * @param CRM_Core_Form $form
    */
-  function buildForm(&$form) {
+  public function buildForm(&$form) {
 
     /**
      * You can define a custom title for the search form
@@ -86,7 +84,7 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac
     $form->addDate('end_date', ts('...through'), FALSE, array('formatType' => 'custom'));
 
     $financial_types = CRM_Contribute_PseudoConstant::financialType();
-    foreach($financial_types as $financial_type_id => $financial_type) {
+    foreach ($financial_types as $financial_type_id => $financial_type) {
       $form->addElement('checkbox', "financial_type_id[{$financial_type_id}]", 'Financial Type', $financial_type);
     }
 
@@ -99,15 +97,26 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac
 
   /**
    * Define the smarty template used to layout the search form and results listings.
+   *
+   * @return string
    */
-  function templateFile() {
+  public function templateFile() {
     return 'CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl';
   }
 
   /**
    * Construct the search query
+   *
+   * @param int $offset
+   * @param int $rowcount
+   * @param string|object $sort
+   * @param bool $includeContactIDs
+   * @param bool $justIDs
+   *
+   * @return string
    */
-  function all($offset = 0, $rowcount = 0, $sort = NULL,
+  function all(
+    $offset = 0, $rowcount = 0, $sort = NULL,
     $includeContactIDs = FALSE, $justIDs = FALSE
   ) {
 
@@ -167,23 +176,21 @@ $having
   /**
    * @return string
    */
-  function from() {
+  public function from() {
     return "
 civicrm_contribution AS contrib,
 civicrm_contact AS contact_a
 ";
   }
 
-  /*
-      * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
-      *
-      */
   /**
+   * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
+   *
    * @param bool $includeContactIDs
    *
    * @return string
    */
-  function where($includeContactIDs = FALSE) {
+  public function where($includeContactIDs = FALSE) {
     $clauses = array();
 
     $clauses[] = "contrib.contact_id = contact_a.id";
@@ -228,7 +235,7 @@ civicrm_contact AS contact_a
    *
    * @return string
    */
-  function having($includeContactIDs = FALSE) {
+  public function having($includeContactIDs = FALSE) {
     $clauses = array();
     $min = CRM_Utils_Array::value('min_amount', $this->_formValues);
     if ($min) {
@@ -248,7 +255,11 @@ civicrm_contact AS contact_a
   /*
    * Functions below generally don't need to be modified
    */
-  function count() {
+
+  /**
+   * @inheritDoc
+   */
+  public function count() {
     $sql = $this->all();
 
     $dao = CRM_Core_DAO::executeQuery($sql,
@@ -264,21 +275,21 @@ civicrm_contact AS contact_a
    *
    * @return string
    */
-  function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) {
+  public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) {
     return $this->all($offset, $rowcount, $sort, FALSE, TRUE);
   }
 
   /**
    * @return array
    */
-  function &columns() {
+  public function &columns() {
     return $this->_columns;
   }
 
   /**
    * @param $title
    */
-  function setTitle($title) {
+  public function setTitle($title) {
     if ($title) {
       CRM_Utils_System::setTitle($title);
     }
@@ -290,8 +301,7 @@ civicrm_contact AS contact_a
   /**
    * @return null
    */
-  function summary() {
+  public function summary() {
     return NULL;
   }
 }
-