Completed
Push — master ( 97ae17...26fbd7 )
by Adam
18:33
created
include/language/en_us.lang.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -760,14 +760,14 @@
 block discarded – undo
760 760
     ),
761 761
     'dom_switch_bool' => array('on' => 'Yes',
762 762
         'off' => 'No',
763
-        '' => 'No', ),
763
+        '' => 'No',),
764 764
 
765 765
     'dom_email_link_type' => array('sugar' => 'SuiteCRM Email Client',
766
-        'mailto' => 'External Email Client', ),
766
+        'mailto' => 'External Email Client',),
767 767
 
768 768
     'dom_email_editor_option' => array('' => 'Default Email Format',
769 769
         'html' => 'HTML Email',
770
-        'plain' => 'Plain Text Email', ),
770
+        'plain' => 'Plain Text Email',),
771 771
 
772 772
     'schedulers_times_dom' => array('not run' => 'Past Run Time, Not Executed',
773 773
         'ready' => 'Ready',
Please login to merge, or discard this patch.
OpportunitiesByLeadSourceByOutcomeDashlet.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -114,24 +114,24 @@  discard block
 block discarded – undo
114 114
         */
115 115
 
116 116
         $currency_symbol = $sugar_config['default_currency_symbol'];
117
-        if ($current_user->getPreference('currency')){
117
+        if ($current_user->getPreference('currency')) {
118 118
 
119 119
             $currency = new Currency();
120 120
             $currency->retrieve($current_user->getPreference('currency'));
121 121
             $currency_symbol = $currency->symbol;
122 122
         }
123
-        $subtitle = translate('LBL_OPP_SIZE', 'Charts') . " " . $currency_symbol . "1" . translate('LBL_OPP_THOUSANDS', 'Charts');
123
+        $subtitle = translate('LBL_OPP_SIZE', 'Charts')." ".$currency_symbol."1".translate('LBL_OPP_THOUSANDS', 'Charts');
124 124
         $thousands_symbol = translate('LBL_OPP_THOUSANDS', 'Charts');
125 125
 
126 126
         $module = 'Opportunities';
127
-        $action =  'index';
128
-        $query =  'true';
127
+        $action = 'index';
128
+        $query = 'true';
129 129
         $searchFormTab = 'advanced_search';
130
-        $groupBy = array( 'lead_source', 'sales_stage' );
130
+        $groupBy = array('lead_source', 'sales_stage');
131 131
 
132 132
 
133 133
         $url_params = array();
134
-        if ( count($this->lsbo_ids) > 0 )
134
+        if (count($this->lsbo_ids) > 0)
135 135
             $url_params['assigned_user_id'] = array_values($this->lsbo_ids);
136 136
 
137 137
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         $colours = "['#a6cee3','#1f78b4','#b2df8a','#33a02c','#fb9a99','#e31a1c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#ffff99','#b15928']";
159 159
 
160
-        if(!is_array($chartReadyData['data'])||count($chartReadyData['data']) < 1)
160
+        if (!is_array($chartReadyData['data']) || count($chartReadyData['data']) < 1)
161 161
         {
162 162
             return "<h3 class='noGraphDataPoints'>$this->noDataMessage</h3>";
163 163
         }
@@ -253,43 +253,43 @@  discard block
 block discarded – undo
253 253
         $query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total, ".
254 254
             "count(*) as opp_count FROM opportunities ";
255 255
         $query .= " WHERE opportunities.deleted=0 ";
256
-        if ( count($this->lsbo_ids) > 0 )
257
-            $query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->lsbo_ids)."') ";
258
-        if ( count($this->lsbo_lead_sources) > 0 )
259
-            $query .= "AND opportunities.lead_source IN ('".implode("','",$this->lsbo_lead_sources)."') ";
256
+        if (count($this->lsbo_ids) > 0)
257
+            $query .= "AND opportunities.assigned_user_id IN ('".implode("','", $this->lsbo_ids)."') ";
258
+        if (count($this->lsbo_lead_sources) > 0)
259
+            $query .= "AND opportunities.lead_source IN ('".implode("','", $this->lsbo_lead_sources)."') ";
260 260
         else
261
-            $query .= "AND opportunities.lead_source IN ('".implode("','",array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
261
+            $query .= "AND opportunities.lead_source IN ('".implode("','", array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
262 262
         $query .= " GROUP BY sales_stage,lead_source ORDER BY lead_source,sales_stage";
263 263
 
264 264
         return $query;
265 265
     }
266 266
 
267
-    protected function prepareChartData($data,$currency_symbol, $thousands_symbol)
267
+    protected function prepareChartData($data, $currency_symbol, $thousands_symbol)
268 268
     {
269 269
         //Use the  lead_source to categorise the data for the charts
270 270
         $chart['labels'] = array();
271 271
         $chart['data'] = array();
272 272
         //Need to add all elements into the key, as they are stacked (even though the category is not present, the value could be
273 273
         $chart['key'] = array();
274
-        $chart['tooltips']= array();
274
+        $chart['tooltips'] = array();
275 275
 
276
-        foreach($data as $i)
276
+        foreach ($data as $i)
277 277
         {
278 278
             $key = $i["lead_source"];
279 279
             $keyDom = $i["lead_source_dom_option"];
280 280
             $stage = $i["sales_stage"];
281 281
             $stageDom = $i["sales_stage_dom_option"];
282
-            if(!in_array($key,$chart['labels']))
282
+            if (!in_array($key, $chart['labels']))
283 283
             {
284 284
                 $chart['labels'][] = $key;
285 285
                 $chart['data'][] = array();
286 286
             }
287
-            if(!in_array($stage,$chart['key']))
287
+            if (!in_array($stage, $chart['key']))
288 288
                 $chart['key'][] = $stage;
289 289
 
290 290
             $formattedFloat = (float)number_format((float)$i["total"], 2, '.', '');
291
-            $chart['data'][count($chart['data'])-1][] = $formattedFloat;
292
-            $chart['tooltips'][]="<div><input type='hidden' class='stage' value='$stageDom'><input type='hidden' class='category' value='$keyDom'></div>".$stage.'('.$currency_symbol.$formattedFloat.$thousands_symbol.') '.$key;
291
+            $chart['data'][count($chart['data']) - 1][] = $formattedFloat;
292
+            $chart['tooltips'][] = "<div><input type='hidden' class='stage' value='$stageDom'><input type='hidden' class='category' value='$keyDom'></div>".$stage.'('.$currency_symbol.$formattedFloat.$thousands_symbol.') '.$key;
293 293
         }
294 294
         return $chart;
295 295
     }
Please login to merge, or discard this patch.
modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
     {
67 67
         global $timedate;
68 68
 
69
-        if(empty($options['obm_date_start']))
69
+        if (empty($options['obm_date_start']))
70 70
             $options['obm_date_start'] = $timedate->nowDbDate();
71 71
 
72
-        if(empty($options['obm_date_end']))
72
+        if (empty($options['obm_date_end']))
73 73
             $options['obm_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
74 74
 
75
-        parent::__construct($id,$options);
75
+        parent::__construct($id, $options);
76 76
     }
77 77
 
78 78
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function display()
93 93
     {
94 94
         $currency_symbol = $GLOBALS['sugar_config']['default_currency_symbol'];
95
-        if ($GLOBALS['current_user']->getPreference('currency')){
95
+        if ($GLOBALS['current_user']->getPreference('currency')) {
96 96
 
97 97
             $currency = new Currency();
98 98
             $currency->retrieve($GLOBALS['current_user']->getPreference('currency'));
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
         $action = 'index';
104 104
         $query = 'true';
105 105
         $searchFormTab = 'advanced_search';
106
-        $groupBy = array( 'm', 'sales_stage', );
106
+        $groupBy = array('m', 'sales_stage',);
107 107
 
108 108
 
109 109
         $data = $this->getChartData($this->constructQuery());
110 110
 
111 111
         //I have taken out the sort as this will throw off the labels we have calculated
112
-        $data = $this->sortData($data,'m', false, 'sales_stage', true, true);
112
+        $data = $this->sortData($data, 'm', false, 'sales_stage', true, true);
113 113
 
114 114
         $chartReadyData = $this->prepareChartData($data, $currency_symbol, $thousands_symbol);
115 115
         $canvasId = 'rGraphOutcomeByMonth'.uniqid();
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $colours = "['#a6cee3','#1f78b4','#b2df8a','#33a02c','#fb9a99','#e31a1c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#ffff99','#b15928']";
130 130
 
131 131
 
132
-        if(!is_array($chartReadyData['data'])||count($chartReadyData['data']) < 1)
132
+        if (!is_array($chartReadyData['data']) || count($chartReadyData['data']) < 1)
133 133
         {
134 134
             return "<h3 class='noGraphDataPoints'>$this->noDataMessage</h3>";
135 135
         }
@@ -242,45 +242,45 @@  discard block
 block discarded – undo
242 242
     protected function constructQuery()
243 243
     {
244 244
         $query = "SELECT sales_stage,".
245
-            db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))." as m, ".
245
+            db_convert('opportunities.date_closed', 'date_format', array("'%Y-%m'"), array("'YYYY-MM'"))." as m, ".
246 246
             "sum(amount_usdollar/1000) as total, count(*) as opp_count FROM opportunities ";
247
-        $query .= " WHERE opportunities.date_closed >= ".db_convert("'".$this->obm_date_start."'",'date') .
248
-            " AND opportunities.date_closed <= ".db_convert("'".$this->obm_date_end."'",'date') .
247
+        $query .= " WHERE opportunities.date_closed >= ".db_convert("'".$this->obm_date_start."'", 'date').
248
+            " AND opportunities.date_closed <= ".db_convert("'".$this->obm_date_end."'", 'date').
249 249
             " AND opportunities.deleted=0";
250 250
         if (count($this->obm_ids) > 0)
251
-            $query .= " AND opportunities.assigned_user_id IN ('" . implode("','",$this->obm_ids) . "')";
251
+            $query .= " AND opportunities.assigned_user_id IN ('".implode("','", $this->obm_ids)."')";
252 252
         $query .= " GROUP BY sales_stage,".
253
-            db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'")) .
253
+            db_convert('opportunities.date_closed', 'date_format', array("'%Y-%m'"), array("'YYYY-MM'")).
254 254
             " ORDER BY m";
255 255
 
256 256
         return $query;
257 257
     }
258 258
 
259
-    protected function prepareChartData($data,$currency_symbol, $thousands_symbol)
259
+    protected function prepareChartData($data, $currency_symbol, $thousands_symbol)
260 260
     {
261 261
         //Use the  lead_source to categorise the data for the charts
262 262
         $chart['labels'] = array();
263 263
         $chart['data'] = array();
264 264
         //Need to add all elements into the key, as they are stacked (even though the category is not present, the value could be)
265 265
         $chart['key'] = array();
266
-        $chart['tooltips']= array();
266
+        $chart['tooltips'] = array();
267 267
 
268
-        foreach($data as $i)
268
+        foreach ($data as $i)
269 269
         {
270 270
             $key = $i["m"];
271 271
             $stage = $i["sales_stage"];
272 272
             $stage_dom_option = $i["sales_stage_dom_option"];
273
-            if(!in_array($key,$chart['labels']))
273
+            if (!in_array($key, $chart['labels']))
274 274
             {
275 275
                 $chart['labels'][] = $key;
276 276
                 $chart['data'][] = array();
277 277
             }
278
-            if(!in_array($stage,$chart['key']))
278
+            if (!in_array($stage, $chart['key']))
279 279
                 $chart['key'][] = $stage;
280 280
 
281 281
             $formattedFloat = (float)number_format((float)$i["total"], 2, '.', '');
282
-            $chart['data'][count($chart['data'])-1][] = $formattedFloat;
283
-            $chart['tooltips'][]="<div><input type='hidden' class='stage' value='$stage_dom_option'><input type='hidden' class='date' value='$key'></div>".$stage.'('.$currency_symbol.$formattedFloat.$thousands_symbol.') '.$key;
282
+            $chart['data'][count($chart['data']) - 1][] = $formattedFloat;
283
+            $chart['tooltips'][] = "<div><input type='hidden' class='stage' value='$stage_dom_option'><input type='hidden' class='date' value='$key'></div>".$stage.'('.$currency_symbol.$formattedFloat.$thousands_symbol.') '.$key;
284 284
         }
285 285
         return $chart;
286 286
     }
Please login to merge, or discard this patch.
Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
     {
68 68
         global $timedate;
69 69
 
70
-        if(empty($options['pbss_date_start']))
70
+        if (empty($options['pbss_date_start']))
71 71
             $options['pbss_date_start'] = $timedate->nowDbDate();
72 72
 
73
-        if(empty($options['pbss_date_end']))
73
+        if (empty($options['pbss_date_end']))
74 74
             $options['pbss_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
75 75
 
76
-        if(empty($options['title']))
76
+        if (empty($options['title']))
77 77
             $options['title'] = translate('LBL_RGraph_PIPELINE_FORM_TITLE', 'Home');
78 78
 
79
-        parent::__construct($id,$options);
79
+        parent::__construct($id, $options);
80 80
     }
81 81
 
82 82
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $thousands_symbol = translate('LBL_OPP_THOUSANDS', 'Charts');
110 110
 
111 111
         $currency_symbol = $sugar_config['default_currency_symbol'];
112
-        if ($current_user->getPreference('currency')){
112
+        if ($current_user->getPreference('currency')) {
113 113
 
114 114
             $currency = new Currency();
115 115
             $currency->retrieve($current_user->getPreference('currency'));
@@ -135,20 +135,20 @@  discard block
 block discarded – undo
135 135
         //These are taken in the same fashion as the hard-coded array above
136 136
         $module = 'Opportunities';
137 137
         $action = 'index';
138
-        $query  ='true';
139
-        $searchFormTab ='advanced_search';
138
+        $query  = 'true';
139
+        $searchFormTab = 'advanced_search';
140 140
 
141 141
         $chartWidth     = 900;
142 142
         $chartHeight    = 500;
143 143
 
144
-        $autoRefresh = $this->processAutoRefresh();//$autoRefresh
144
+        $autoRefresh = $this->processAutoRefresh(); //$autoRefresh
145 145
 
146 146
         $colours = "['#a6cee3','#1f78b4','#b2df8a','#33a02c','#fb9a99','#e31a1c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#ffff99','#b15928']";
147 147
         //<canvas id='$canvasId' width='$chartWidth' height='$chartHeight'>[No canvas support]</canvas>
148 148
         //<canvas id='test123'  width='$chartWidth' height='$chartHeight'>[No canvas support]</canvas>
149 149
 
150 150
         //There is always an ending anchor value, hence this check is that the data array is less than 2
151
-        if(!is_array($chartReadyData['data'])||count($chartReadyData['data']) < 2)
151
+        if (!is_array($chartReadyData['data']) || count($chartReadyData['data']) < 2)
152 152
         {
153 153
             return "<h3 class='noGraphDataPoints'>$this->noDataMessage</h3>";
154 154
         }
@@ -272,13 +272,13 @@  discard block
 block discarded – undo
272 272
         }
273 273
 
274 274
         $result = $db->query($query);
275
-        while($row = $db->fetchByAssoc($result, false))
275
+        while ($row = $db->fetchByAssoc($result, false))
276 276
             $temp_data[] = $row;
277 277
 
278 278
         // reorder and set the array based on the order of selected_datax
279
-        foreach($selected_datax as $sales_stage){
280
-            foreach($temp_data as $key => $value){
281
-                if ($value['sales_stage'] == $sales_stage){
279
+        foreach ($selected_datax as $sales_stage) {
280
+            foreach ($temp_data as $key => $value) {
281
+                if ($value['sales_stage'] == $sales_stage) {
282 282
                     $value['sales_stage'] = $app_list_strings['sales_stage_dom'][$value['sales_stage']];
283 283
                     $value['key'] = $sales_stage;
284 284
                     $value['value'] = $value['sales_stage'];
@@ -318,40 +318,40 @@  discard block
 block discarded – undo
318 318
                         count(*) AS opp_count,
319 319
                         sum(amount_usdollar/1000) AS total
320 320
                     FROM users,opportunities  ";
321
-        $query .= " WHERE opportunities.date_closed >= ". db_convert("'".$this->pbss_date_start."'",'date').
322
-            " AND opportunities.date_closed <= ".db_convert("'".$this->pbss_date_end."'",'date') .
321
+        $query .= " WHERE opportunities.date_closed >= ".db_convert("'".$this->pbss_date_start."'", 'date').
322
+            " AND opportunities.date_closed <= ".db_convert("'".$this->pbss_date_end."'", 'date').
323 323
             " AND opportunities.assigned_user_id = users.id  AND opportunities.deleted=0 ";
324 324
         $query .= " GROUP BY opportunities.sales_stage";
325 325
 
326 326
         return $query;
327 327
     }
328 328
 
329
-    protected function prepareChartData($data,$currency_symbol, $thousands_symbol)
329
+    protected function prepareChartData($data, $currency_symbol, $thousands_symbol)
330 330
     {
331 331
         //return $data;
332
-        $chart['labels']=array();
333
-        $chart['data']=array();
332
+        $chart['labels'] = array();
333
+        $chart['data'] = array();
334 334
         $total = 0;
335
-        foreach($data as $i)
335
+        foreach ($data as $i)
336 336
         {
337 337
             //$chart['labelsAndValues'][]=$i['key'].' ('.$currency.(int)$i['total'].')';
338
-            $chart['labelsAndValues'][]=$this->resizeLabel($i['value']).' ('.$currency_symbol.(int)$i['total'].$thousands_symbol.')';
339
-            $chart['labels'][]=$i['value'];
340
-            $chart['data'][]=(int)$i['total'];
341
-            $total+=(int)$i['total'];
338
+            $chart['labelsAndValues'][] = $this->resizeLabel($i['value']).' ('.$currency_symbol.(int)$i['total'].$thousands_symbol.')';
339
+            $chart['labels'][] = $i['value'];
340
+            $chart['data'][] = (int)$i['total'];
341
+            $total += (int)$i['total'];
342 342
         }
343 343
         //The funnel needs n+1 elements (to bind the shape to as per http://www.rgraph.net/demos/funnel-interactive-key.html)
344 344
         //$chart['data'][]=1;
345
-        $chart['total']=$total;
345
+        $chart['total'] = $total;
346 346
         return $chart;
347 347
     }
348 348
 
349 349
     protected function resizeLabel($label)
350 350
     {
351
-        if(strlen($label) < $this->maxLabelSizeBeforeTotal)
351
+        if (strlen($label) < $this->maxLabelSizeBeforeTotal)
352 352
             return $label;
353 353
         else
354
-            return substr($label,0,$this->maxLabelSizeBeforeTotal).$this->labelReplacementString;
354
+            return substr($label, 0, $this->maxLabelSizeBeforeTotal).$this->labelReplacementString;
355 355
 
356 356
     }
357 357
 
Please login to merge, or discard this patch.
modules/AOR_Reports/aor_utils.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     $fieldDisplay = $currentBean->field_name_map[$field]['vname'];
63 63
     $fieldDisplay = translate($fieldDisplay, $currentBean->module_dir);
64 64
     $fieldDisplay = trim($fieldDisplay, ':');
65
-    foreach($modulePathDisplay as &$module) {
65
+    foreach ($modulePathDisplay as &$module) {
66 66
         $module = isset($app_list_strings['aor_moduleList'][$module]) ? $app_list_strings['aor_moduleList'][$module] : (
67 67
             isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module
68 68
         );
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 function requestToUserParameters()
74 74
 {
75 75
     $params = array();
76
-    if(isset($_REQUEST['parameter_id']) && $_REQUEST['parameter_id']) {
76
+    if (isset($_REQUEST['parameter_id']) && $_REQUEST['parameter_id']) {
77 77
         foreach ($_REQUEST['parameter_id'] as $key => $parameterId) {
78 78
             if ($_REQUEST['parameter_type'][$key] === 'Multi') {
79 79
                 $_REQUEST['parameter_value'][$key] = encodeMultienumValue(explode(',', $_REQUEST['parameter_value'][$key]));
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     } else if ($date_time_period_list_selected == 'this_month') {
164 164
         $datetime_period = $datetime_period->setDate($datetime_period->format('Y'), $datetime_period->format('m'), 1);
165 165
     } else if ($date_time_period_list_selected == 'last_month') {
166
-        $datetime_period = $datetime_period->setDate($datetime_period->format('Y'), $datetime_period->format('m')-1, 1);
166
+        $datetime_period = $datetime_period->setDate($datetime_period->format('Y'), $datetime_period->format('m') - 1, 1);
167 167
     } else if ($date_time_period_list_selected == 'this_quarter') {
168 168
         $thisMonth = $datetime_period->setDate($datetime_period->format('Y'), $datetime_period->format('m'), 1);
169 169
         if ($thisMonth >= $q[1]['start'] && $thisMonth <= $q[1]['end']) {
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     $offsetMonths -= 1;
229 229
     // Offset months
230 230
     if ($offsetMonths > 0) {
231
-        $q1start->add(new DateInterval('P' . $offsetMonths . 'M'));
231
+        $q1start->add(new DateInterval('P'.$offsetMonths.'M'));
232 232
     }
233 233
     $q1end = DateTime::createFromFormat(DATE_ISO8601, $q1start->format(DATE_ISO8601));
234 234
     $q1end->add(new DateInterval('P2M'));
Please login to merge, or discard this patch.