Merge pull request #4882 from colemanw/CRM-15789
[civicrm-core.git] / CRM / Report / Form / Contribute / Lybunt.php
index a590d1174e9f49331c9ae1a1119092a06fc90963..73ff1e4a905d125c0b1734a9929b84bfc70f524f 100644 (file)
@@ -52,7 +52,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
   /**
    *
    */
-  function __construct() {
+  public function __construct() {
     $yearsInPast = 10;
     $yearsInFuture = 1;
     $date = CRM_Core_SelectValues::date('custom', NULL, $yearsInPast, $yearsInFuture);
@@ -122,8 +122,8 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
           ),
         ),
       )
-      + $this->addAddressFields()
-      + array(
+    + $this->addAddressFields()
+    + array(
         'civicrm_contribution' => array(
           'dao' => 'CRM_Contribute_DAO_Contribution',
           'fields' => array(
@@ -187,17 +187,16 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     parent::__construct();
   }
 
-  function preProcess() {
+  public function preProcess() {
     parent::preProcess();
   }
 
-  function select() {
+  public function select() {
 
     $this->_columnHeaders = $select = array();
     $current_year = $this->_params['yid_value'];
     $previous_year = $current_year - 1;
 
-
     foreach ($this->_columns as $tableName => $table) {
 
       if (array_key_exists('fields', $table)) {
@@ -236,7 +235,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     $this->_select = "SELECT  " . implode(', ', $select) . " ";
   }
 
-  function from() {
+  public function from() {
 
     $this->_from = "
         FROM  civicrm_contribution  {$this->_aliases['civicrm_contribution']}
@@ -259,7 +258,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     $this->addAddressFromClause();
   }
 
-  function where() {
+  public function where() {
     $this->_statusClause = "";
     $clauses = array($this->_aliases['civicrm_contribution'] . '.is_test = 0');
     $current_year = $this->_params['yid_value'];
@@ -277,8 +276,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
  WHERE " . self::fiscalYearOffset('contri.receive_date') .
               " = $previous_year AND contri.is_test = 0)";
           }
-          elseif (CRM_Utils_Array::value('type', $field) &
-            CRM_Utils_Type::T_DATE
+          elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
           ) {
             $relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
             $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
@@ -319,7 +317,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     }
   }
 
-  function groupBy() {
+  public function groupBy() {
     $this->_groupBy =
       "GROUP BY  {$this->_aliases['civicrm_contribution']}.contact_id, " .
       self::fiscalYearOffset($this->_aliases['civicrm_contribution'] .
@@ -332,7 +330,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
    *
    * @return array
    */
-  function statistics(&$rows) {
+  public function statistics(&$rows) {
     $statistics = parent::statistics($rows);
     if (!empty($rows)) {
       $select = "
@@ -353,7 +351,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     return $statistics;
   }
 
-  function postProcess() {
+  public function postProcess() {
 
     // get ready with post process params
     $this->beginPostProcess();
@@ -431,7 +429,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
   /**
    * @param $rows
    */
-  function buildChart(&$rows) {
+  public function buildChart(&$rows) {
 
     $graphRows = array();
     $count = 0;
@@ -466,7 +464,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
   /**
    * @param $rows
    */
-  function alterDisplay(&$rows) {
+  public function alterDisplay(&$rows) {
     // custom code to alter rows
     $entryFound = FALSE;
 
@@ -510,14 +508,13 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
    *
    * @return array
    */
-  function getOperationPair($type = "string", $fieldName = NULL) {
+  public function getOperationPair($type = "string", $fieldName = NULL) {
     if ($fieldName == 'yid') {
       return array(
         'calendar' => ts('Is Calendar Year'),
-        'fiscal' => ts('Fiscal Year Starting')
+        'fiscal' => ts('Fiscal Year Starting'),
       );
     }
     return parent::getOperationPair($type, $fieldName);
   }
 }
-