Merge pull request #15595 from eileenmcnaughton/dedupe3
[civicrm-core.git] / CRM / Contribute / Page / DashBoard.php
index 79835022dce5470c6e4380fb15a1392cd287b154..161a7b5aad12d65a38a176811b284330eef95766 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019                                |
+ | Copyright CiviCRM LLC (c) 2004-2020                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
  */
 
 /**
@@ -44,18 +44,18 @@ class CRM_Contribute_Page_DashBoard extends CRM_Core_Page {
   public function preProcess() {
     CRM_Utils_System::setTitle(ts('CiviContribute'));
 
-    $status = array('Valid', 'Cancelled');
-    $prefixes = array('start', 'month', 'year');
+    $status = ['Valid', 'Cancelled'];
+    $prefixes = ['start', 'month', 'year'];
     $startDate = NULL;
-    $startToDate = $monthToDate = $yearToDate = array();
+    $startToDate = $monthToDate = $yearToDate = [];
 
     //get contribution dates.
     $dates = CRM_Contribute_BAO_Contribution::getContributionDates();
-    foreach (array(
-               'now',
-               'yearDate',
-               'monthDate',
-             ) as $date) {
+    foreach ([
+      'now',
+      'yearDate',
+      'monthDate',
+    ] as $date) {
       $$date = $dates[$date];
     }
     // fiscal years end date