Completed
Push — develop ( e1f81f...539a89 )
by Adrien
16:11
created
src/PhpSpreadsheet/Calculation/LookupRef.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -60,28 +60,28 @@  discard block
 block discarded – undo
60 60
 
61 61
         if ($sheetText > '') {
62 62
             if (strpos($sheetText, ' ') !== false) {
63
-                $sheetText = "'".$sheetText."'";
63
+                $sheetText = "'" . $sheetText . "'";
64 64
             }
65
-            $sheetText .='!';
65
+            $sheetText .= '!';
66 66
         }
67 67
         if ((!is_bool($referenceStyle)) || $referenceStyle) {
68 68
             $rowRelative = $columnRelative = '$';
69
-            $column = \PhpSpreadsheet\Cell::stringFromColumnIndex($column-1);
69
+            $column = \PhpSpreadsheet\Cell::stringFromColumnIndex($column - 1);
70 70
             if (($relativity == 2) || ($relativity == 4)) {
71 71
                 $columnRelative = '';
72 72
             }
73 73
             if (($relativity == 3) || ($relativity == 4)) {
74 74
                 $rowRelative = '';
75 75
             }
76
-            return $sheetText.$columnRelative.$column.$rowRelative.$row;
76
+            return $sheetText . $columnRelative . $column . $rowRelative . $row;
77 77
         } else {
78 78
             if (($relativity == 2) || ($relativity == 4)) {
79
-                $column = '['.$column.']';
79
+                $column = '[' . $column . ']';
80 80
             }
81 81
             if (($relativity == 3) || ($relativity == 4)) {
82
-                $row = '['.$row.']';
82
+                $row = '[' . $row . ']';
83 83
             }
84
-            return $sheetText.'R'.$row.'C'.$column;
84
+            return $sheetText . 'R' . $row . 'C' . $column;
85 85
         }
86 86
     }
87 87
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         $args = func_get_args();
260 260
         $pCell = array_pop($args);
261 261
 
262
-        $linkURL     = (is_null($linkURL))     ? '' : Functions::flattenSingleValue($linkURL);
262
+        $linkURL     = (is_null($linkURL)) ? '' : Functions::flattenSingleValue($linkURL);
263 263
         $displayName = (is_null($displayName)) ? '' : Functions::flattenSingleValue($displayName);
264 264
 
265 265
         if ((!is_object($pCell)) || (trim($linkURL) == '')) {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      */
298 298
     public static function INDIRECT($cellAddress = null, \PhpSpreadsheet\Cell $pCell = null)
299 299
     {
300
-        $cellAddress    = Functions::flattenSingleValue($cellAddress);
300
+        $cellAddress = Functions::flattenSingleValue($cellAddress);
301 301
         if (is_null($cellAddress) || $cellAddress === '') {
302 302
             return Functions::REF();
303 303
         }
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
             list($cellAddress1, $cellAddress2) = explode(':', $cellAddress);
309 309
         }
310 310
 
311
-        if ((!preg_match('/^'.\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress1, $matches)) ||
312
-            ((!is_null($cellAddress2)) && (!preg_match('/^'.\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress2, $matches)))) {
313
-            if (!preg_match('/^'.\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $cellAddress1, $matches)) {
311
+        if ((!preg_match('/^' . \PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
312
+            ((!is_null($cellAddress2)) && (!preg_match('/^' . \PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))) {
313
+            if (!preg_match('/^' . \PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $cellAddress1, $matches)) {
314 314
                 return Functions::REF();
315 315
             }
316 316
 
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
         }
418 418
         $endCellColumn = \PhpSpreadsheet\Cell::stringFromColumnIndex($endCellColumn);
419 419
 
420
-        $cellAddress = $startCellColumn.$startCellRow;
420
+        $cellAddress = $startCellColumn . $startCellRow;
421 421
         if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {
422
-            $cellAddress .= ':'.$endCellColumn.$endCellRow;
422
+            $cellAddress .= ':' . $endCellColumn . $endCellRow;
423 423
         }
424 424
 
425 425
         if ($sheetName !== null) {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
     {
495 495
         $lookup_array = Functions::flattenArray($lookup_array);
496 496
         $lookup_value = Functions::flattenSingleValue($lookup_value);
497
-        $match_type    = (is_null($match_type)) ? 1 : (int) Functions::flattenSingleValue($match_type);
497
+        $match_type = (is_null($match_type)) ? 1 : (int) Functions::flattenSingleValue($match_type);
498 498
         //    MATCH is not case sensitive
499 499
         $lookup_value = strtolower($lookup_value);
500 500
 
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
                 $lookup_array[$i] = strtolower($lookupArrayValue);
527 527
             }
528 528
             if ((is_null($lookupArrayValue)) && (($match_type == 1) || ($match_type == -1))) {
529
-                $lookup_array = array_slice($lookup_array, 0, $i-1);
529
+                $lookup_array = array_slice($lookup_array, 0, $i - 1);
530 530
             }
531 531
         }
532 532
 
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                     break;
555 555
                 } else {
556 556
                     // the previous cell was the match
557
-                    return $keySet[$i-1]+1;
557
+                    return $keySet[$i - 1] + 1;
558 558
                 }
559 559
             } elseif (($match_type == 1) && ($lookupArrayValue >= $lookup_value)) {
560 560
                 $i = array_search($i, $keySet);
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
                     break;
565 565
                 } else {
566 566
                     // the previous cell was the match
567
-                    return $keySet[$i-1]+1;
567
+                    return $keySet[$i - 1] + 1;
568 568
                 }
569 569
             }
570 570
         }
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
     {
753 753
         $lookup_value   = Functions::flattenSingleValue($lookup_value);
754 754
         $index_number   = Functions::flattenSingleValue($index_number);
755
-        $not_exact_match    = Functions::flattenSingleValue($not_exact_match);
755
+        $not_exact_match = Functions::flattenSingleValue($not_exact_match);
756 756
 
757 757
         // index_number must be greater than or equal to 1
758 758
         if ($index_number < 1) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTime.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 
127 127
         $adjustmentMonthsString = (string) $adjustmentMonths;
128 128
         if ($adjustmentMonths > 0) {
129
-            $adjustmentMonthsString = '+'.$adjustmentMonths;
129
+            $adjustmentMonthsString = '+' . $adjustmentMonths;
130 130
         }
131 131
         if ($adjustmentMonths != 0) {
132
-            $PHPDateObject->modify($adjustmentMonthsString.' months');
132
+            $PHPDateObject->modify($adjustmentMonthsString . ' months');
133 133
         }
134 134
         $nMonth = (int) $PHPDateObject->format('m');
135 135
         $nYear = (int) $PHPDateObject->format('Y');
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
138 138
         if ($monthDiff != $adjustmentMonths) {
139 139
             $adjustDays = (int) $PHPDateObject->format('d');
140
-            $adjustDaysString = '-'.$adjustDays.' days';
140
+            $adjustDaysString = '-' . $adjustDays . ' days';
141 141
             $PHPDateObject->modify($adjustDaysString);
142 142
         }
143 143
         return $PHPDateObject;
@@ -299,20 +299,20 @@  discard block
 block discarded – undo
299 299
             (!is_numeric($day))) {
300 300
             return Functions::VALUE();
301 301
         }
302
-        $year    = (integer) $year;
302
+        $year = (integer) $year;
303 303
         $month    = (integer) $month;
304
-        $day    = (integer) $day;
304
+        $day = (integer) $day;
305 305
 
306 306
         $baseYear = \PhpSpreadsheet\Shared\Date::getExcelCalendar();
307 307
         // Validate parameters
308
-        if ($year < ($baseYear-1900)) {
308
+        if ($year < ($baseYear - 1900)) {
309 309
             return Functions::NAN();
310 310
         }
311
-        if ((($baseYear-1900) != 0) && ($year < $baseYear) && ($year >= 1900)) {
311
+        if ((($baseYear - 1900) != 0) && ($year < $baseYear) && ($year >= 1900)) {
312 312
             return Functions::NAN();
313 313
         }
314 314
 
315
-        if (($year < $baseYear) && ($year >= ($baseYear-1900))) {
315
+        if (($year < $baseYear) && ($year >= ($baseYear - 1900))) {
316 316
             $year += 1900;
317 317
         }
318 318
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                 }
433 433
                 return (float) \PhpSpreadsheet\Shared\Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);
434 434
             case Functions::RETURNDATE_PHP_NUMERIC:
435
-                return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second));    // -2147468400; //    -2147472000 + 3600
435
+                return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; //    -2147472000 + 3600
436 436
             case Functions::RETURNDATE_PHP_OBJECT:
437 437
                 $dayAdjust = 0;
438 438
                 if ($hour < 0) {
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
                     $dayAdjust = floor($hour / 24);
446 446
                     $hour = $hour % 24;
447 447
                 }
448
-                $phpDateObject = new \DateTime('1900-01-01 '.$hour.':'.$minute.':'.$second);
448
+                $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);
449 449
                 if ($dayAdjust != 0) {
450
-                    $phpDateObject->modify($dayAdjust.' days');
450
+                    $phpDateObject->modify($dayAdjust . ' days');
451 451
                 }
452 452
                 return $phpDateObject;
453 453
         }
@@ -482,12 +482,12 @@  discard block
 block discarded – undo
482 482
      */
483 483
     public static function DATEVALUE($dateValue = 1)
484 484
     {
485
-        $dateValueOrig= $dateValue;
485
+        $dateValueOrig = $dateValue;
486 486
         $dateValue = trim(Functions::flattenSingleValue($dateValue), '"');
487 487
         //    Strip any ordinals because they're allowed in Excel (English only)
488 488
         $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue);
489 489
         //    Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany)
490
-        $dateValue    = str_replace(array('/', '.', '-', '  '), array(' ', ' ', ' ', ' '), $dateValue);
490
+        $dateValue = str_replace(array('/', '.', '-', '  '), array(' ', ' ', ' ', ' '), $dateValue);
491 491
 
492 492
         $yearFound = false;
493 493
         $t1 = explode(' ', $dateValue);
@@ -541,9 +541,9 @@  discard block
 block discarded – undo
541 541
             if ($testVal1 < 31 && $testVal2 < 12 && $testVal3 < 12 && strlen($testVal3) == 2) {
542 542
                 $testVal3 += 2000;
543 543
             }
544
-            $PHPDateArray = date_parse($testVal1.'-'.$testVal2.'-'.$testVal3);
544
+            $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3);
545 545
             if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
546
-                $PHPDateArray = date_parse($testVal2.'-'.$testVal1.'-'.$testVal3);
546
+                $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3);
547 547
                 if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
548 548
                     return Functions::VALUE();
549 549
                 }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
                 case Functions::RETURNDATE_PHP_NUMERIC:
584 584
                     return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue);
585 585
                 case Functions::RETURNDATE_PHP_OBJECT:
586
-                    return new \DateTime($PHPDateArray['year'].'-'.$PHPDateArray['month'].'-'.$PHPDateArray['day'].' 00:00:00');
586
+                    return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00');
587 587
             }
588 588
         }
589 589
         return Functions::VALUE();
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         $timeValue = str_replace(array('/', '.'), array('-', '-'), $timeValue);
619 619
 
620 620
         $arraySplit = preg_split('/[\/:\-\s]/', $timeValue);
621
-        if ((count($arraySplit) == 2 ||count($arraySplit) == 3) && $arraySplit[0] > 24) {
621
+        if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) {
622 622
             $arraySplit[0] = ($arraySplit[0] % 24);
623 623
             $timeValue = implode(':', $arraySplit);
624 624
         }
@@ -642,9 +642,9 @@  discard block
 block discarded – undo
642 642
                 case Functions::RETURNDATE_EXCEL:
643 643
                     return (float) $excelDateValue;
644 644
                 case Functions::RETURNDATE_PHP_NUMERIC:
645
-                    return (integer) $phpDateValue = \PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue+25569) - 3600;
645
+                    return (integer) $phpDateValue = \PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue + 25569) - 3600;
646 646
                 case Functions::RETURNDATE_PHP_OBJECT:
647
-                    return new \DateTime('1900-01-01 '.$PHPDateArray['hour'].':'.$PHPDateArray['minute'].':'.$PHPDateArray['second']);
647
+                    return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);
648 648
             }
649 649
         }
650 650
         return Functions::VALUE();
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
             case 'MD':
720 720
                 if ($endDays < $startDays) {
721 721
                     $retVal = $endDays;
722
-                    $PHPEndDateObject->modify('-'.$endDays.' days');
722
+                    $PHPEndDateObject->modify('-' . $endDays . ' days');
723 723
                     $adjustDays = $PHPEndDateObject->format('j');
724 724
                     $retVal += ($adjustDays - $startDays);
725 725
                 } else {
@@ -787,8 +787,8 @@  discard block
 block discarded – undo
787 787
      */
788 788
     public static function DAYS360($startDate = 0, $endDate = 0, $method = false)
789 789
     {
790
-        $startDate    = Functions::flattenSingleValue($startDate);
791
-        $endDate    = Functions::flattenSingleValue($endDate);
790
+        $startDate = Functions::flattenSingleValue($startDate);
791
+        $endDate = Functions::flattenSingleValue($endDate);
792 792
 
793 793
         if (is_string($startDate = self::getDateValue($startDate))) {
794 794
             return Functions::VALUE();
@@ -843,9 +843,9 @@  discard block
 block discarded – undo
843 843
      */
844 844
     public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0)
845 845
     {
846
-        $startDate    = Functions::flattenSingleValue($startDate);
847
-        $endDate    = Functions::flattenSingleValue($endDate);
848
-        $method        = Functions::flattenSingleValue($method);
846
+        $startDate = Functions::flattenSingleValue($startDate);
847
+        $endDate = Functions::flattenSingleValue($endDate);
848
+        $method = Functions::flattenSingleValue($method);
849 849
 
850 850
         if (is_string($startDate = self::getDateValue($startDate))) {
851 851
             return Functions::VALUE();
@@ -940,8 +940,8 @@  discard block
 block discarded – undo
940 940
     public static function NETWORKDAYS($startDate, $endDate)
941 941
     {
942 942
         //    Retrieve the mandatory start and end date that are referenced in the function definition
943
-        $startDate    = Functions::flattenSingleValue($startDate);
944
-        $endDate    = Functions::flattenSingleValue($endDate);
943
+        $startDate = Functions::flattenSingleValue($startDate);
944
+        $endDate = Functions::flattenSingleValue($endDate);
945 945
         //    Flush the mandatory start and end date that are referenced in the function definition, and get the optional days
946 946
         $dateArgs = Functions::flattenArray(func_get_args());
947 947
         array_shift($dateArgs);
@@ -1027,8 +1027,8 @@  discard block
 block discarded – undo
1027 1027
     public static function WORKDAY($startDate, $endDays)
1028 1028
     {
1029 1029
         //    Retrieve the mandatory start date and days that are referenced in the function definition
1030
-        $startDate    = Functions::flattenSingleValue($startDate);
1031
-        $endDays    = Functions::flattenSingleValue($endDays);
1030
+        $startDate = Functions::flattenSingleValue($startDate);
1031
+        $endDays = Functions::flattenSingleValue($endDays);
1032 1032
         //    Flush the mandatory start date and days that are referenced in the function definition, and get the optional days
1033 1033
         $dateArgs = Functions::flattenArray(func_get_args());
1034 1034
         array_shift($dateArgs);
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
 
1051 1051
         $startDoW = self::DAYOFWEEK($startDate, 3);
1052 1052
         if (self::DAYOFWEEK($startDate, 3) >= 5) {
1053
-            $startDate += ($decrementing) ? -$startDoW + 4: 7 - $startDoW;
1053
+            $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW;
1054 1054
             ($decrementing) ? $endDays++ : $endDays--;
1055 1055
         }
1056 1056
 
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
         //    Adjust the calculated end date if it falls over a weekend
1061 1061
         $endDoW = self::DAYOFWEEK($endDate, 3);
1062 1062
         if ($endDoW >= 5) {
1063
-            $endDate += ($decrementing) ? -$endDoW + 4: 7 - $endDoW;
1063
+            $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
1064 1064
         }
1065 1065
 
1066 1066
         //    Test any extra holiday parameters
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
      */
1132 1132
     public static function DAYOFMONTH($dateValue = 1)
1133 1133
     {
1134
-        $dateValue    = Functions::flattenSingleValue($dateValue);
1134
+        $dateValue = Functions::flattenSingleValue($dateValue);
1135 1135
 
1136 1136
         if ($dateValue === null) {
1137 1137
             $dateValue = 1;
@@ -1245,8 +1245,8 @@  discard block
 block discarded – undo
1245 1245
      */
1246 1246
     public static function WEEKOFYEAR($dateValue = 1, $method = 1)
1247 1247
     {
1248
-        $dateValue    = Functions::flattenSingleValue($dateValue);
1249
-        $method        = Functions::flattenSingleValue($method);
1248
+        $dateValue = Functions::flattenSingleValue($dateValue);
1249
+        $method = Functions::flattenSingleValue($method);
1250 1250
 
1251 1251
         if (!is_numeric($method)) {
1252 1252
             return Functions::VALUE();
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
      */
1292 1292
     public static function MONTHOFYEAR($dateValue = 1)
1293 1293
     {
1294
-        $dateValue    = Functions::flattenSingleValue($dateValue);
1294
+        $dateValue = Functions::flattenSingleValue($dateValue);
1295 1295
 
1296 1296
         if (empty($dateValue)) {
1297 1297
             $dateValue = 1;
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
      */
1325 1325
     public static function YEAR($dateValue = 1)
1326 1326
     {
1327
-        $dateValue    = Functions::flattenSingleValue($dateValue);
1327
+        $dateValue = Functions::flattenSingleValue($dateValue);
1328 1328
 
1329 1329
         if ($dateValue === null) {
1330 1330
             $dateValue = 1;
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
      */
1357 1357
     public static function HOUROFDAY($timeValue = 0)
1358 1358
     {
1359
-        $timeValue    = Functions::flattenSingleValue($timeValue);
1359
+        $timeValue = Functions::flattenSingleValue($timeValue);
1360 1360
 
1361 1361
         if (!is_numeric($timeValue)) {
1362 1362
             if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
@@ -1397,7 +1397,7 @@  discard block
 block discarded – undo
1397 1397
      */
1398 1398
     public static function MINUTEOFHOUR($timeValue = 0)
1399 1399
     {
1400
-        $timeValue = $timeTester    = Functions::flattenSingleValue($timeValue);
1400
+        $timeValue = $timeTester = Functions::flattenSingleValue($timeValue);
1401 1401
 
1402 1402
         if (!is_numeric($timeValue)) {
1403 1403
             if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
      */
1439 1439
     public static function SECONDOFMINUTE($timeValue = 0)
1440 1440
     {
1441
-        $timeValue    = Functions::flattenSingleValue($timeValue);
1441
+        $timeValue = Functions::flattenSingleValue($timeValue);
1442 1442
 
1443 1443
         if (!is_numeric($timeValue)) {
1444 1444
             if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
@@ -1485,8 +1485,8 @@  discard block
 block discarded – undo
1485 1485
      */
1486 1486
     public static function EDATE($dateValue = 1, $adjustmentMonths = 0)
1487 1487
     {
1488
-        $dateValue            = Functions::flattenSingleValue($dateValue);
1489
-        $adjustmentMonths    = Functions::flattenSingleValue($adjustmentMonths);
1488
+        $dateValue = Functions::flattenSingleValue($dateValue);
1489
+        $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
1490 1490
 
1491 1491
         if (!is_numeric($adjustmentMonths)) {
1492 1492
             return Functions::VALUE();
@@ -1531,8 +1531,8 @@  discard block
 block discarded – undo
1531 1531
      */
1532 1532
     public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0)
1533 1533
     {
1534
-        $dateValue            = Functions::flattenSingleValue($dateValue);
1535
-        $adjustmentMonths    = Functions::flattenSingleValue($adjustmentMonths);
1534
+        $dateValue = Functions::flattenSingleValue($dateValue);
1535
+        $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
1536 1536
 
1537 1537
         if (!is_numeric($adjustmentMonths)) {
1538 1538
             return Functions::VALUE();
@@ -1544,7 +1544,7 @@  discard block
 block discarded – undo
1544 1544
         }
1545 1545
 
1546 1546
         // Execute function
1547
-        $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths+1);
1547
+        $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1);
1548 1548
         $adjustDays = (int) $PHPDateObject->format('d');
1549 1549
         $adjustDaysString = '-' . $adjustDays . ' days';
1550 1550
         $PHPDateObject->modify($adjustDaysString);
Please login to merge, or discard this patch.