Merge pull request #4963 from rohankatkar/CRM-15830
[civicrm-core.git] / CRM / Report / Form / Contribute / Sybunt.php
index e1831a46778b738d1d7535b9443629f74fe884c7..67f6f21f215485e6b9e0ea30dd5defff251b067b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -42,9 +42,8 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
   public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
 
   /**
-   *
    */
-  function __construct() {
+  public function __construct() {
     $yearsInPast = 10;
     $yearsInFuture = 1;
     $date = CRM_Core_SelectValues::date('custom', NULL, $yearsInPast, $yearsInFuture);
@@ -178,11 +177,11 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     parent::__construct();
   }
 
-  function preProcess() {
+  public function preProcess() {
     parent::preProcess();
   }
 
-  function select() {
+  public function select() {
     $select = array();
     $this->_columnHeaders = array();
     $current_year = $this->_params['yid_value'];
@@ -236,7 +235,7 @@ class CRM_Report_Form_Contribute_Sybunt 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_Sybunt extends CRM_Report_Form {
     $this->addAddressFromClause();
   }
 
-  function where() {
+  public function where() {
     $this->_statusClause = "";
     $clauses = array($this->_aliases['civicrm_contribution'] . '.is_test = 0');
     foreach ($this->_columns as $tableName => $table) {
@@ -273,8 +272,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
               self::fiscalYearOffset('contri.receive_date') .
               " = {$this->_params['yid_value']} 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);
@@ -315,7 +313,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     }
   }
 
-  function groupBy() {
+  public function groupBy() {
     $this->assign('chartSupported', TRUE);
     $this->_groupBy =
       "Group BY {$this->_aliases['civicrm_contribution']}.contact_id, " .
@@ -328,7 +326,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
    *
    * @return array
    */
-  function statistics(&$rows) {
+  public function statistics(&$rows) {
     $statistics = parent::statistics($rows);
 
     if (!empty($rows)) {
@@ -349,7 +347,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     return $statistics;
   }
 
-  function postProcess() {
+  public function postProcess() {
     // get ready with post process params
     $this->beginPostProcess();
 
@@ -435,7 +433,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
   /**
    * @param $rows
    */
-  function buildChart(&$rows) {
+  public function buildChart(&$rows) {
     $graphRows = array();
     $count = 0;
     $current_year = $this->_params['yid_value'];
@@ -481,7 +479,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
   /**
    * @param $rows
    */
-  function alterDisplay(&$rows) {
+  public function alterDisplay(&$rows) {
     // custom code to alter rows
     $entryFound = FALSE;
 
@@ -518,21 +516,20 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     }
   }
 
-  // Override "This Year" $op options
   /**
+   * Override "This Year" $op options
    * @param string $type
    * @param null $fieldName
    *
    * @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);
   }
 }
-