Completed
Pull Request — develop (#47)
by
unknown
10:56
created
src/PhpSpreadsheet/Calculation.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -2049,8 +2049,8 @@  discard block
 block discarded – undo
2049 2049
 
2050 2050
     private static function loadLocales()
2051 2051
     {
2052
-        $localeFileDirectory = PHPSPREADSHEET_ROOT.'PhpSpreadsheet/locale/';
2053
-        foreach (glob($localeFileDirectory.'/*', GLOB_ONLYDIR) as $filename) {
2052
+        $localeFileDirectory = PHPSPREADSHEET_ROOT . 'PhpSpreadsheet/locale/';
2053
+        foreach (glob($localeFileDirectory . '/*', GLOB_ONLYDIR) as $filename) {
2054 2054
             $filename = substr($filename, strlen($localeFileDirectory) + 1);
2055 2055
             if ($filename != 'en') {
2056 2056
                 self::$validLocaleLanguages[] = $filename;
@@ -2279,10 +2279,10 @@  discard block
 block discarded – undo
2279 2279
             //    Default is English, if user isn't requesting english, then read the necessary data from the locale files
2280 2280
             if ($locale != 'en_us') {
2281 2281
                 //    Search for a file with a list of function names for locale
2282
-                $functionNamesFile = PHPSPREADSHEET_ROOT.'PhpSpreadsheet'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'functions';
2282
+                $functionNamesFile = PHPSPREADSHEET_ROOT . 'PhpSpreadsheet' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions';
2283 2283
                 if (!file_exists($functionNamesFile)) {
2284 2284
                     //    If there isn't a locale specific function file, look for a language specific function file
2285
-                    $functionNamesFile = PHPSPREADSHEET_ROOT.'PhpSpreadsheet'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'functions';
2285
+                    $functionNamesFile = PHPSPREADSHEET_ROOT . 'PhpSpreadsheet' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $language . DIRECTORY_SEPARATOR . 'functions';
2286 2286
                     if (!file_exists($functionNamesFile)) {
2287 2287
                         return false;
2288 2288
                     }
@@ -2308,9 +2308,9 @@  discard block
 block discarded – undo
2308 2308
                     self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE'];
2309 2309
                 }
2310 2310
 
2311
-                $configFile = PHPSPREADSHEET_ROOT.'PhpSpreadsheet'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'config';
2311
+                $configFile = PHPSPREADSHEET_ROOT . 'PhpSpreadsheet' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config';
2312 2312
                 if (!file_exists($configFile)) {
2313
-                    $configFile = PHPSPREADSHEET_ROOT.'PhpSpreadsheet'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'config';
2313
+                    $configFile = PHPSPREADSHEET_ROOT . 'PhpSpreadsheet' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $language . DIRECTORY_SEPARATOR . 'config';
2314 2314
                 }
2315 2315
                 if (file_exists($configFile)) {
2316 2316
                     $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
@@ -2353,7 +2353,7 @@  discard block
 block discarded – undo
2353 2353
                     break;
2354 2354
                 case $fromSeparator:
2355 2355
                     if (!$inBraces) {
2356
-                        $formula = mb_substr($formula, 0, $i).$toSeparator.mb_substr($formula, $i + 1);
2356
+                        $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1);
2357 2357
                     }
2358 2358
             }
2359 2359
         }
@@ -2404,20 +2404,20 @@  discard block
 block discarded – undo
2404 2404
         if (self::$functionReplaceFromExcel === null) {
2405 2405
             self::$functionReplaceFromExcel = [];
2406 2406
             foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {
2407
-                self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelFunctionName).'([\s]*\()/Ui';
2407
+                self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelFunctionName) . '([\s]*\()/Ui';
2408 2408
             }
2409 2409
             foreach (array_keys(self::$localeBoolean) as $excelBoolean) {
2410
-                self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui';
2410
+                self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelBoolean) . '([^\w\.])/Ui';
2411 2411
             }
2412 2412
         }
2413 2413
 
2414 2414
         if (self::$functionReplaceToLocale === null) {
2415 2415
             self::$functionReplaceToLocale = [];
2416 2416
             foreach (array_values(self::$localeFunctions) as $localeFunctionName) {
2417
-                self::$functionReplaceToLocale[] = '$1'.trim($localeFunctionName).'$2';
2417
+                self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2';
2418 2418
             }
2419 2419
             foreach (array_values(self::$localeBoolean) as $localeBoolean) {
2420
-                self::$functionReplaceToLocale[] = '$1'.trim($localeBoolean).'$2';
2420
+                self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2';
2421 2421
             }
2422 2422
         }
2423 2423
 
@@ -2432,20 +2432,20 @@  discard block
 block discarded – undo
2432 2432
         if (self::$functionReplaceFromLocale === null) {
2433 2433
             self::$functionReplaceFromLocale = [];
2434 2434
             foreach (array_values(self::$localeFunctions) as $localeFunctionName) {
2435
-                self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($localeFunctionName).'([\s]*\()/Ui';
2435
+                self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($localeFunctionName) . '([\s]*\()/Ui';
2436 2436
             }
2437 2437
             foreach (array_values(self::$localeBoolean) as $excelBoolean) {
2438
-                self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui';
2438
+                self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($excelBoolean) . '([^\w\.])/Ui';
2439 2439
             }
2440 2440
         }
2441 2441
 
2442 2442
         if (self::$functionReplaceToExcel === null) {
2443 2443
             self::$functionReplaceToExcel = [];
2444 2444
             foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {
2445
-                self::$functionReplaceToExcel[] = '$1'.trim($excelFunctionName).'$2';
2445
+                self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2';
2446 2446
             }
2447 2447
             foreach (array_keys(self::$localeBoolean) as $excelBoolean) {
2448
-                self::$functionReplaceToExcel[] = '$1'.trim($excelBoolean).'$2';
2448
+                self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2';
2449 2449
             }
2450 2450
         }
2451 2451
 
@@ -2479,12 +2479,12 @@  discard block
 block discarded – undo
2479 2479
     {
2480 2480
         if (is_string($value)) {
2481 2481
             //    Error values cannot be "wrapped"
2482
-            if (preg_match('/^'.self::CALCULATION_REGEXP_ERROR.'$/i', $value, $match)) {
2482
+            if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) {
2483 2483
                 //    Return Excel errors "as is"
2484 2484
                 return $value;
2485 2485
             }
2486 2486
             //    Return strings wrapped in quotes
2487
-            return '"'.$value.'"';
2487
+            return '"' . $value . '"';
2488 2488
         //    Convert numeric errors to NaN error
2489 2489
         } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
2490 2490
             return Calculation\Functions::NAN();
@@ -2733,7 +2733,7 @@  discard block
 block discarded – undo
2733 2733
 
2734 2734
         $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null;
2735 2735
         $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : "\x00Wrk";
2736
-        $wsCellReference = $wsTitle.'!'.$cellID;
2736
+        $wsCellReference = $wsTitle . '!' . $cellID;
2737 2737
 
2738 2738
         if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) {
2739 2739
             return $cellValue;
@@ -2957,9 +2957,9 @@  discard block
 block discarded – undo
2957 2957
                     }
2958 2958
                 }
2959 2959
 
2960
-                return '{ '.implode($rpad, $returnMatrix).' }';
2960
+                return '{ ' . implode($rpad, $returnMatrix) . ' }';
2961 2961
             } elseif (is_string($value) && (trim($value, '"') == $value)) {
2962
-                return '"'.$value.'"';
2962
+                return '"' . $value . '"';
2963 2963
             } elseif (is_bool($value)) {
2964 2964
                 return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];
2965 2965
             }
@@ -2997,13 +2997,13 @@  discard block
 block discarded – undo
2997 2997
                 if ($value == '') {
2998 2998
                     return 'an empty string';
2999 2999
                 } elseif ($value{0} == '#') {
3000
-                    return 'a '.$value.' error';
3000
+                    return 'a ' . $value . ' error';
3001 3001
                 } else {
3002 3002
                     $typeString = 'a string';
3003 3003
                 }
3004 3004
             }
3005 3005
 
3006
-            return $typeString.' with a value of '.$this->showValue($value);
3006
+            return $typeString . ' with a value of ' . $this->showValue($value);
3007 3007
         }
3008 3008
     }
3009 3009
 
@@ -3105,13 +3105,13 @@  discard block
 block discarded – undo
3105 3105
         //        so we store the parent worksheet so that we can re-attach it when necessary
3106 3106
         $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null;
3107 3107
 
3108
-        $regexpMatchString = '/^('.self::CALCULATION_REGEXP_FUNCTION.
3109
-                                '|'.self::CALCULATION_REGEXP_CELLREF.
3110
-                                '|'.self::CALCULATION_REGEXP_NUMBER.
3111
-                                '|'.self::CALCULATION_REGEXP_STRING.
3112
-                                '|'.self::CALCULATION_REGEXP_OPENBRACE.
3113
-                                '|'.self::CALCULATION_REGEXP_NAMEDRANGE.
3114
-                                '|'.self::CALCULATION_REGEXP_ERROR.
3108
+        $regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION .
3109
+                                '|' . self::CALCULATION_REGEXP_CELLREF .
3110
+                                '|' . self::CALCULATION_REGEXP_NUMBER .
3111
+                                '|' . self::CALCULATION_REGEXP_STRING .
3112
+                                '|' . self::CALCULATION_REGEXP_OPENBRACE .
3113
+                                '|' . self::CALCULATION_REGEXP_NAMEDRANGE .
3114
+                                '|' . self::CALCULATION_REGEXP_ERROR .
3115 3115
                                 ')/si';
3116 3116
 
3117 3117
         //    Start with initialisation
@@ -3163,7 +3163,7 @@  discard block
 block discarded – undo
3163 3163
                     }
3164 3164
                 }
3165 3165
                 $d = $stack->last(2);
3166
-                if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) {    //    Did this parenthesis just close a function?
3166
+                if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) {    //    Did this parenthesis just close a function?
3167 3167
                     $functionName = $matches[1]; //    Get the function name
3168 3168
                     $d = $stack->pop();
3169 3169
                     $argumentCount = $d['value']; //    See how many arguments there were (argument count is the next value stored on the stack)
@@ -3184,7 +3184,7 @@  discard block
 block discarded – undo
3184 3184
                         if ($expectedArgumentCount < 0) {
3185 3185
                             if ($argumentCount > abs($expectedArgumentCount)) {
3186 3186
                                 $argumentCountError = true;
3187
-                                $expectedArgumentCountString = 'no more than '.abs($expectedArgumentCount);
3187
+                                $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount);
3188 3188
                             }
3189 3189
                         } else {
3190 3190
                             if ($argumentCount != $expectedArgumentCount) {
@@ -3198,25 +3198,25 @@  discard block
 block discarded – undo
3198 3198
                             case '+':
3199 3199
                                 if ($argumentCount < $argMatch[1]) {
3200 3200
                                     $argumentCountError = true;
3201
-                                    $expectedArgumentCountString = $argMatch[1].' or more ';
3201
+                                    $expectedArgumentCountString = $argMatch[1] . ' or more ';
3202 3202
                                 }
3203 3203
                                 break;
3204 3204
                             case '-':
3205 3205
                                 if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) {
3206 3206
                                     $argumentCountError = true;
3207
-                                    $expectedArgumentCountString = 'between '.$argMatch[1].' and '.$argMatch[3];
3207
+                                    $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3];
3208 3208
                                 }
3209 3209
                                 break;
3210 3210
                             case ',':
3211 3211
                                 if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) {
3212 3212
                                     $argumentCountError = true;
3213
-                                    $expectedArgumentCountString = 'either '.$argMatch[1].' or '.$argMatch[3];
3213
+                                    $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3];
3214 3214
                                 }
3215 3215
                                 break;
3216 3216
                         }
3217 3217
                     }
3218 3218
                     if ($argumentCountError) {
3219
-                        return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, ".$expectedArgumentCountString.' expected');
3219
+                        return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, " . $expectedArgumentCountString . ' expected');
3220 3220
                     }
3221 3221
                 }
3222 3222
                 ++$index;
@@ -3235,7 +3235,7 @@  discard block
 block discarded – undo
3235 3235
                 }
3236 3236
                 // make sure there was a function
3237 3237
                 $d = $stack->last(2);
3238
-                if (!preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) {
3238
+                if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) {
3239 3239
                     return $this->raiseFormulaError('Formula Error: Unexpected ,');
3240 3240
                 }
3241 3241
                 $d = $stack->pop();
@@ -3253,23 +3253,23 @@  discard block
 block discarded – undo
3253 3253
                 $val = $match[1];
3254 3254
                 $length = strlen($val);
3255 3255
 
3256
-                if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $val, $matches)) {
3256
+                if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $val, $matches)) {
3257 3257
                     $val = preg_replace('/\s/u', '', $val);
3258 3258
                     if (isset(self::$phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) {    // it's a function
3259 3259
                         $stack->push('Function', strtoupper($val));
3260 3260
                         $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index + $length), $amatch);
3261 3261
                         if ($ax) {
3262
-                            $stack->push('Operand Count for Function '.strtoupper($val).')', 0);
3262
+                            $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 0);
3263 3263
                             $expectingOperator = true;
3264 3264
                         } else {
3265
-                            $stack->push('Operand Count for Function '.strtoupper($val).')', 1);
3265
+                            $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 1);
3266 3266
                             $expectingOperator = false;
3267 3267
                         }
3268 3268
                         $stack->push('Brace', '(');
3269 3269
                     } else {    // it's a var w/ implicit multiplication
3270 3270
                         $output[] = ['type' => 'Value', 'value' => $matches[1], 'reference' => null];
3271 3271
                     }
3272
-                } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $val, $matches)) {
3272
+                } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $val, $matches)) {
3273 3273
                     //    Watch for this case-change when modifying to allow cell references in different worksheets...
3274 3274
                     //    Should only be applied to the actual cell column, not the worksheet name
3275 3275
 
@@ -3281,9 +3281,9 @@  discard block
 block discarded – undo
3281 3281
                             //    Otherwise, we 'inherit' the worksheet reference from the start cell reference
3282 3282
                             //    The start of the cell range reference should be the last entry in $output
3283 3283
                             $startCellRef = $output[count($output) - 1]['value'];
3284
-                            preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $startCellRef, $startMatches);
3284
+                            preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $startCellRef, $startMatches);
3285 3285
                             if ($startMatches[2] > '') {
3286
-                                $val = $startMatches[2].'!'.$val;
3286
+                                $val = $startMatches[2] . '!' . $val;
3287 3287
                             }
3288 3288
                         } else {
3289 3289
                             return $this->raiseFormulaError('3D Range references are not yet supported');
@@ -3314,14 +3314,14 @@  discard block
 block discarded – undo
3314 3314
                             ($startRowColRef <= 1048576) && ($val <= 1048576)) {
3315 3315
                             //    Row range
3316 3316
                             $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestColumn() : 'XFD'; //    Max 16,384 columns for Excel2007
3317
-                            $output[count($output) - 1]['value'] = $rangeWS1.'A'.$startRowColRef;
3318
-                            $val = $rangeWS2.$endRowColRef.$val;
3317
+                            $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef;
3318
+                            $val = $rangeWS2 . $endRowColRef . $val;
3319 3319
                         } elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) &&
3320 3320
                             (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) {
3321 3321
                             //    Column range
3322 3322
                             $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestRow() : 1048576; //    Max 1,048,576 rows for Excel2007
3323
-                            $output[count($output) - 1]['value'] = $rangeWS1.strtoupper($startRowColRef).'1';
3324
-                            $val = $rangeWS2.$val.$endRowColRef;
3323
+                            $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1';
3324
+                            $val = $rangeWS2 . $val . $endRowColRef;
3325 3325
                         }
3326 3326
                     }
3327 3327
 
@@ -3383,7 +3383,7 @@  discard block
 block discarded – undo
3383 3383
                 }
3384 3384
                 //    If we're expecting an operator, but only have a space between the previous and next operands (and both are
3385 3385
                 //        Cell References) then we have an INTERSECTION operator
3386
-                if (($expectingOperator) && (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'.*/Ui', substr($formula, $index), $match)) &&
3386
+                if (($expectingOperator) && (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) &&
3387 3387
                     ($output[count($output) - 1]['type'] == 'Cell Reference')) {
3388 3388
                     while ($stack->count() > 0 &&
3389 3389
                         ($o2 = $stack->last()) &&
@@ -3416,7 +3416,7 @@  discard block
 block discarded – undo
3416 3416
             $cKeys = array_keys(array_keys($operand[$rowKey]));
3417 3417
             $colKey = array_shift($cKeys);
3418 3418
             if (ctype_upper($colKey)) {
3419
-                $operandData['reference'] = $colKey.$rowKey;
3419
+                $operandData['reference'] = $colKey . $rowKey;
3420 3420
             }
3421 3421
         }
3422 3422
 
@@ -3490,20 +3490,20 @@  discard block
 block discarded – undo
3490 3490
                         if ($sheet1 == $sheet2) {
3491 3491
                             if ($operand1Data['reference'] === null) {
3492 3492
                                 if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) {
3493
-                                    $operand1Data['reference'] = $pCell->getColumn().$operand1Data['value'];
3493
+                                    $operand1Data['reference'] = $pCell->getColumn() . $operand1Data['value'];
3494 3494
                                 } elseif (trim($operand1Data['reference']) == '') {
3495 3495
                                     $operand1Data['reference'] = $pCell->getCoordinate();
3496 3496
                                 } else {
3497
-                                    $operand1Data['reference'] = $operand1Data['value'].$pCell->getRow();
3497
+                                    $operand1Data['reference'] = $operand1Data['value'] . $pCell->getRow();
3498 3498
                                 }
3499 3499
                             }
3500 3500
                             if ($operand2Data['reference'] === null) {
3501 3501
                                 if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) {
3502
-                                    $operand2Data['reference'] = $pCell->getColumn().$operand2Data['value'];
3502
+                                    $operand2Data['reference'] = $pCell->getColumn() . $operand2Data['value'];
3503 3503
                                 } elseif (trim($operand2Data['reference']) == '') {
3504 3504
                                     $operand2Data['reference'] = $pCell->getCoordinate();
3505 3505
                                 } else {
3506
-                                    $operand2Data['reference'] = $operand2Data['value'].$pCell->getRow();
3506
+                                    $operand2Data['reference'] = $operand2Data['value'] . $pCell->getRow();
3507 3507
                                 }
3508 3508
                             }
3509 3509
 
@@ -3514,7 +3514,7 @@  discard block
 block discarded – undo
3514 3514
                                 $oCol[] = Cell::columnIndexFromString($oCR[0]) - 1;
3515 3515
                                 $oRow[] = $oCR[1];
3516 3516
                             }
3517
-                            $cellRef = Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.Cell::stringFromColumnIndex(max($oCol)).max($oRow);
3517
+                            $cellRef = Cell::stringFromColumnIndex(min($oCol)) . min($oRow) . ':' . Cell::stringFromColumnIndex(max($oCol)) . max($oRow);
3518 3518
                             if ($pCellParent !== null) {
3519 3519
                                 $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false);
3520 3520
                             } else {
@@ -3564,7 +3564,7 @@  discard block
 block discarded – undo
3564 3564
                                 $result = '#VALUE!';
3565 3565
                             }
3566 3566
                         } else {
3567
-                            $result = '"'.str_replace('""', '"', self::unwrapResult($operand1, '"').self::unwrapResult($operand2, '"')).'"';
3567
+                            $result = '"' . str_replace('""', '"', self::unwrapResult($operand1, '"') . self::unwrapResult($operand2, '"')) . '"';
3568 3568
                         }
3569 3569
                         $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result));
3570 3570
                         $stack->push('Value', $result);
@@ -3579,7 +3579,7 @@  discard block
 block discarded – undo
3579 3579
                                 $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]);
3580 3580
                             }
3581 3581
                         }
3582
-                        $cellRef = Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.Cell::stringFromColumnIndex(max($oCol)).max($oRow);
3582
+                        $cellRef = Cell::stringFromColumnIndex(min($oCol)) . min($oRow) . ':' . Cell::stringFromColumnIndex(max($oCol)) . max($oRow);
3583 3583
                         $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect));
3584 3584
                         $stack->push('Value', $cellIntersect, $cellRef);
3585 3585
                         break;
@@ -3613,14 +3613,14 @@  discard block
 block discarded – undo
3613 3613
                 } else {
3614 3614
                     $this->executeNumericBinaryOperation($cellID, $multiplier, $arg, '*', 'arrayTimesEquals', $stack);
3615 3615
                 }
3616
-            } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $token, $matches)) {
3616
+            } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) {
3617 3617
                 $cellRef = null;
3618 3618
                 if (isset($matches[8])) {
3619 3619
                     if ($pCell === null) {
3620 3620
                         //                        We can't access the range, so return a REF error
3621 3621
                         $cellValue = Calculation\Functions::REF();
3622 3622
                     } else {
3623
-                        $cellRef = $matches[6].$matches[7].':'.$matches[9].$matches[10];
3623
+                        $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
3624 3624
                         if ($matches[2] > '') {
3625 3625
                             $matches[2] = trim($matches[2], "\"'");
3626 3626
                             if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
@@ -3650,7 +3650,7 @@  discard block
 block discarded – undo
3650 3650
                         //                        We can't access the cell, so return a REF error
3651 3651
                         $cellValue = Calculation\Functions::REF();
3652 3652
                     } else {
3653
-                        $cellRef = $matches[6].$matches[7];
3653
+                        $cellRef = $matches[6] . $matches[7];
3654 3654
                         if ($matches[2] > '') {
3655 3655
                             $matches[2] = trim($matches[2], "\"'");
3656 3656
                             if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
@@ -3685,7 +3685,7 @@  discard block
 block discarded – undo
3685 3685
                 $stack->push('Value', $cellValue, $cellRef);
3686 3686
 
3687 3687
             // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on
3688
-            } elseif (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $token, $matches)) {
3688
+            } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $token, $matches)) {
3689 3689
                 $functionName = $matches[1];
3690 3690
                 $argCount = $stack->pop();
3691 3691
                 $argCount = $argCount['value'];
@@ -3738,7 +3738,7 @@  discard block
 block discarded – undo
3738 3738
                     if ($functionName != 'MKMATRIX') {
3739 3739
                         if ($this->_debugLog->getWriteDebugLog()) {
3740 3740
                             krsort($argArrayVals);
3741
-                            $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator.' ', Calculation\Functions::flattenArray($argArrayVals)), ' )');
3741
+                            $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator . ' ', Calculation\Functions::flattenArray($argArrayVals)), ' )');
3742 3742
                         }
3743 3743
                     }
3744 3744
 
@@ -3769,7 +3769,7 @@  discard block
 block discarded – undo
3769 3769
                 } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) {
3770 3770
                     $stack->push('Value', $token);
3771 3771
                 // if the token is a named range, push the named range name onto the stack
3772
-                } elseif (preg_match('/^'.self::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $token, $matches)) {
3772
+                } elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $token, $matches)) {
3773 3773
                     $namedRange = $matches[6];
3774 3774
                     $this->_debugLog->writeDebugLog('Evaluating Named Range ', $namedRange);
3775 3775
                     $cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false);
@@ -4084,7 +4084,7 @@  discard block
 block discarded – undo
4084 4084
 
4085 4085
             // Extract range
4086 4086
             $aReferences = Cell::extractAllCellReferencesInRange($pRange);
4087
-            $pRange = $pSheetName.'!'.$pRange;
4087
+            $pRange = $pSheetName . '!' . $pRange;
4088 4088
             if (!isset($aReferences[1])) {
4089 4089
                 //    Single cell in range
4090 4090
                 sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow);
@@ -4143,9 +4143,9 @@  discard block
 block discarded – undo
4143 4143
                 $splitRange = Cell::splitRange($pRange);
4144 4144
                 //    Convert row and column references
4145 4145
                 if (ctype_alpha($splitRange[0][0])) {
4146
-                    $pRange = $splitRange[0][0].'1:'.$splitRange[0][1].$namedRange->getWorksheet()->getHighestRow();
4146
+                    $pRange = $splitRange[0][0] . '1:' . $splitRange[0][1] . $namedRange->getWorksheet()->getHighestRow();
4147 4147
                 } elseif (ctype_digit($splitRange[0][0])) {
4148
-                    $pRange = 'A'.$splitRange[0][0].':'.$namedRange->getWorksheet()->getHighestColumn().$splitRange[0][1];
4148
+                    $pRange = 'A' . $splitRange[0][0] . ':' . $namedRange->getWorksheet()->getHighestColumn() . $splitRange[0][1];
4149 4149
                 }
4150 4150
             } else {
4151 4151
                 return Calculation\Functions::REF();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/RichText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
         }
188 188
 
189 189
         return md5(
190
-            $hashElements.
190
+            $hashElements .
191 191
             __CLASS__
192 192
         );
193 193
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
             $imaginary = substr($workString, strlen($realNumber));
776 776
 
777 777
             if (($imaginary == '') && (($realNumber == '') || ($realNumber == '+') || ($realNumber == '-'))) {
778
-                $imaginary = $realNumber.'1';
778
+                $imaginary = $realNumber . '1';
779 779
                 $realNumber = '0';
780 780
             } elseif ($imaginary == '') {
781 781
                 $imaginary = $realNumber;
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
             $complexNumber = substr($complexNumber, 1);
809 809
         }
810 810
         if ($complexNumber{0} == '.') {
811
-            $complexNumber = '0'.$complexNumber;
811
+            $complexNumber = '0' . $complexNumber;
812 812
         }
813 813
         if ($complexNumber{0} == '+') {
814 814
             $complexNumber = substr($complexNumber, 1);
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
             //    Two's Complement
1178 1178
             $x = substr($x, -9);
1179 1179
 
1180
-            return '-'.(512 - bindec($x));
1180
+            return '-' . (512 - bindec($x));
1181 1181
         }
1182 1182
 
1183 1183
         return bindec($x);
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
             return Functions::NAN();
1233 1233
         } elseif (strlen($x) == 10) {
1234 1234
             //    Two's Complement
1235
-            return str_repeat('F', 8).substr(strtoupper(dechex(bindec(substr($x, -9)))), -2);
1235
+            return str_repeat('F', 8) . substr(strtoupper(dechex(bindec(substr($x, -9)))), -2);
1236 1236
         }
1237 1237
         $hexVal = (string) strtoupper(dechex(bindec($x)));
1238 1238
 
@@ -1287,7 +1287,7 @@  discard block
 block discarded – undo
1287 1287
             return Functions::NAN();
1288 1288
         } elseif (strlen($x) == 10) {
1289 1289
             //    Two's Complement
1290
-            return str_repeat('7', 7).substr(strtoupper(decoct(bindec(substr($x, -9)))), -3);
1290
+            return str_repeat('7', 7) . substr(strtoupper(decoct(bindec(substr($x, -9)))), -3);
1291 1291
         }
1292 1292
         $octVal = (string) decoct(bindec($x));
1293 1293
 
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
         $r = strtoupper(dechex($x));
1405 1405
         if (strlen($r) == 8) {
1406 1406
             //    Two's Complement
1407
-            $r = 'FF'.$r;
1407
+            $r = 'FF' . $r;
1408 1408
         }
1409 1409
 
1410 1410
         return self::nbrConversionFormat($r, $places);
@@ -1798,22 +1798,22 @@  discard block
 block discarded – undo
1798 1798
                 } elseif ($imaginary == 1.0) {
1799 1799
                     return (string) $suffix;
1800 1800
                 } elseif ($imaginary == -1.0) {
1801
-                    return (string) '-'.$suffix;
1801
+                    return (string) '-' . $suffix;
1802 1802
                 }
1803 1803
 
1804
-                return (string) $imaginary.$suffix;
1804
+                return (string) $imaginary . $suffix;
1805 1805
             } elseif ($imaginary == 0.0) {
1806 1806
                 return (string) $realNumber;
1807 1807
             } elseif ($imaginary == 1.0) {
1808
-                return (string) $realNumber.'+'.$suffix;
1808
+                return (string) $realNumber . '+' . $suffix;
1809 1809
             } elseif ($imaginary == -1.0) {
1810
-                return (string) $realNumber.'-'.$suffix;
1810
+                return (string) $realNumber . '-' . $suffix;
1811 1811
             }
1812 1812
             if ($imaginary > 0) {
1813
-                $imaginary = (string) '+'.$imaginary;
1813
+                $imaginary = (string) '+' . $imaginary;
1814 1814
             }
1815 1815
 
1816
-            return (string) $realNumber.$imaginary.$suffix;
1816
+            return (string) $realNumber . $imaginary . $suffix;
1817 1817
         }
1818 1818
 
1819 1819
         return Functions::VALUE();
@@ -2238,9 +2238,9 @@  discard block
 block discarded – undo
2238 2238
         $i = $d2 / $d3;
2239 2239
 
2240 2240
         if ($i > 0.0) {
2241
-            return self::cleanComplex($r.'+'.$i.$parsedComplexDivisor['suffix']);
2241
+            return self::cleanComplex($r . '+' . $i . $parsedComplexDivisor['suffix']);
2242 2242
         } elseif ($i < 0.0) {
2243
-            return self::cleanComplex($r.$i.$parsedComplexDivisor['suffix']);
2243
+            return self::cleanComplex($r . $i . $parsedComplexDivisor['suffix']);
2244 2244
         } else {
2245 2245
             return $r;
2246 2246
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             return iconv('UCS-4LE', 'UTF-8', pack('V', $character));
55 55
         }
56 56
 
57
-        return mb_convert_encoding('&#'.intval($character).';', 'UTF-8', 'HTML-ENTITIES');
57
+        return mb_convert_encoding('&#' . intval($character) . ';', 'UTF-8', 'HTML-ENTITIES');
58 58
     }
59 59
 
60 60
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         $mask = '$#,##0';
194 194
         if ($decimals > 0) {
195
-            $mask .= '.'.str_repeat('0', $decimals);
195
+            $mask .= '.' . str_repeat('0', $decimals);
196 196
         } else {
197 197
             $round = pow(10, abs($decimals));
198 198
             if ($value < 0) {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
         $left = self::LEFT($oldText, $start - 1);
504 504
         $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1);
505 505
 
506
-        return $left.$newText.$right;
506
+        return $left . $newText . $right;
507 507
     }
508 508
 
509 509
     /**
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
             $numberValue = str_replace(
608 608
                 \PhpOffice\PhpSpreadsheet\Shared\StringHelper::getThousandsSeparator(),
609 609
                 '',
610
-                trim($value, " \t\n\r\0\x0B".\PhpOffice\PhpSpreadsheet\Shared\StringHelper::getCurrencyCode())
610
+                trim($value, " \t\n\r\0\x0B" . \PhpOffice\PhpSpreadsheet\Shared\StringHelper::getCurrencyCode())
611 611
             );
612 612
             if (is_numeric($numberValue)) {
613 613
                 return (float) $numberValue;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 $condition = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($condition));
304 304
             }
305 305
 
306
-            return '='.$condition;
306
+            return '=' . $condition;
307 307
         } else {
308 308
             preg_match('/([<>=]+)(.*)/', $condition, $matches);
309 309
             list(, $operator, $operand) = $matches;
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
                 $operand = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($operand));
314 314
             }
315 315
 
316
-            return $operator.$operand;
316
+            return $operator . $operand;
317 317
         }
318 318
     }
319 319
 
@@ -653,10 +653,10 @@  discard block
 block discarded – undo
653 653
                 foreach ($value as $k2 => $val) {
654 654
                     if (is_array($val)) {
655 655
                         foreach ($val as $k3 => $v) {
656
-                            $arrayValues[$k1.'.'.$k2.'.'.$k3] = $v;
656
+                            $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v;
657 657
                         }
658 658
                     } else {
659
-                        $arrayValues[$k1.'.'.$k2] = $val;
659
+                        $arrayValues[$k1 . '.' . $k2] = $val;
660 660
                     }
661 661
                 }
662 662
             } else {
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
             $r = !is_array($replace) ? $replace : (isset($replace[$key]) ? $replace[$key] : '');
734 734
             $pos = mb_strpos($subject, $s, 0, 'UTF-8');
735 735
             while ($pos !== false) {
736
-                $subject = mb_substr($subject, 0, $pos, 'UTF-8').$r.mb_substr($subject, $pos + mb_strlen($s, 'UTF-8'), null, 'UTF-8');
736
+                $subject = mb_substr($subject, 0, $pos, 'UTF-8') . $r . mb_substr($subject, $pos + mb_strlen($s, 'UTF-8'), null, 'UTF-8');
737 737
                 $pos = mb_strpos($subject, $s, $pos + mb_strlen($r, 'UTF-8'), 'UTF-8');
738 738
             }
739 739
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,10 +70,10 @@
 block discarded – undo
70 70
         $eom = self::isLastDayOfMonth($result);
71 71
 
72 72
         while ($settlement < \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($result)) {
73
-            $result->modify('-'.$months.' months');
73
+            $result->modify('-' . $months . ' months');
74 74
         }
75 75
         if ($next) {
76
-            $result->modify('+'.$months.' months');
76
+            $result->modify('+' . $months . ' months');
77 77
         }
78 78
 
79 79
         if ($eom) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Database.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
             $testConditionCount = 0;
92 92
             foreach ($criteria as $row => $criterion) {
93 93
                 if ($criterion[$key] > '') {
94
-                    $testCondition[] = '[:'.$criteriaName.']'.Functions::ifCondition($criterion[$key]);
94
+                    $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]);
95 95
                     ++$testConditionCount;
96 96
                 }
97 97
             }
98 98
             if ($testConditionCount > 1) {
99
-                $testConditions[] = 'OR('.implode(',', $testCondition).')';
99
+                $testConditions[] = 'OR(' . implode(',', $testCondition) . ')';
100 100
                 ++$testConditionsCount;
101 101
             } elseif ($testConditionCount == 1) {
102 102
                 $testConditions[] = $testCondition[0];
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         if ($testConditionsCount > 1) {
108
-            $testConditionSet = 'AND('.implode(',', $testConditions).')';
108
+            $testConditionSet = 'AND(' . implode(',', $testConditions) . ')';
109 109
         } elseif ($testConditionsCount == 1) {
110 110
             $testConditionSet = $testConditions[0];
111 111
         }
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
                 if (isset($dataValues[$k])) {
120 120
                     $dataValue = $dataValues[$k];
121 121
                     $dataValue = (is_string($dataValue)) ? \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($dataValue)) : $dataValue;
122
-                    $testConditionList = str_replace('[:'.$criteriaName.']', $dataValue, $testConditionList);
122
+                    $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList);
123 123
                 }
124 124
             }
125 125
             //    evaluate the criteria against the row data
126
-            $result = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue('='.$testConditionList);
126
+            $result = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList);
127 127
             //    If the row failed to meet the criteria, remove it from the database
128 128
             if (!$result) {
129 129
                 unset($database[$dataRow]);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         if ($sheetText > '') {
65 65
             if (strpos($sheetText, ' ') !== false) {
66
-                $sheetText = "'".$sheetText."'";
66
+                $sheetText = "'" . $sheetText . "'";
67 67
             }
68 68
             $sheetText .= '!';
69 69
         }
@@ -77,16 +77,16 @@  discard block
 block discarded – undo
77 77
                 $rowRelative = '';
78 78
             }
79 79
 
80
-            return $sheetText.$columnRelative.$column.$rowRelative.$row;
80
+            return $sheetText . $columnRelative . $column . $rowRelative . $row;
81 81
         } else {
82 82
             if (($relativity == 2) || ($relativity == 4)) {
83
-                $column = '['.$column.']';
83
+                $column = '[' . $column . ']';
84 84
             }
85 85
             if (($relativity == 3) || ($relativity == 4)) {
86
-                $row = '['.$row.']';
86
+                $row = '[' . $row . ']';
87 87
             }
88 88
 
89
-            return $sheetText.'R'.$row.'C'.$column;
89
+            return $sheetText . 'R' . $row . 'C' . $column;
90 90
         }
91 91
     }
92 92
 
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
             list($cellAddress1, $cellAddress2) = explode(':', $cellAddress);
318 318
         }
319 319
 
320
-        if ((!preg_match('/^'.\PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress1, $matches)) ||
321
-            ((!is_null($cellAddress2)) && (!preg_match('/^'.\PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress2, $matches)))) {
322
-            if (!preg_match('/^'.\PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $cellAddress1, $matches)) {
320
+        if ((!preg_match('/^' . \PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
321
+            ((!is_null($cellAddress2)) && (!preg_match('/^' . \PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))) {
322
+            if (!preg_match('/^' . \PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $cellAddress1, $matches)) {
323 323
                 return Functions::REF();
324 324
             }
325 325
 
@@ -426,9 +426,9 @@  discard block
 block discarded – undo
426 426
         }
427 427
         $endCellColumn = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($endCellColumn);
428 428
 
429
-        $cellAddress = $startCellColumn.$startCellRow;
429
+        $cellAddress = $startCellColumn . $startCellRow;
430 430
         if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {
431
-            $cellAddress .= ':'.$endCellColumn.$endCellRow;
431
+            $cellAddress .= ':' . $endCellColumn . $endCellRow;
432 432
         }
433 433
 
434 434
         if ($sheetName !== null) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
             if (!is_numeric($arg)) {
875 875
                 $arg = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($arg));
876 876
             }
877
-            $testCondition = '='.$arg.$condition;
877
+            $testCondition = '=' . $arg . $condition;
878 878
             if (\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
879 879
                 if ((is_null($returnValue)) || ($arg > $returnValue)) {
880 880
                     $returnValue += $arg;
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
             if (!is_numeric($arg)) {
1305 1305
                 $arg = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($arg));
1306 1306
             }
1307
-            $testCondition = '='.$arg.$condition;
1307
+            $testCondition = '=' . $arg . $condition;
1308 1308
             if (\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
1309 1309
                 // Is it a value within our criteria
1310 1310
                 ++$returnValue;
@@ -2314,7 +2314,7 @@  discard block
 block discarded – undo
2314 2314
             if (!is_numeric($arg)) {
2315 2315
                 $arg = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($arg));
2316 2316
             }
2317
-            $testCondition = '='.$arg.$condition;
2317
+            $testCondition = '=' . $arg . $condition;
2318 2318
             if (\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
2319 2319
                 if ((is_null($returnValue)) || ($arg > $returnValue)) {
2320 2320
                     $returnValue = $arg;
@@ -2476,7 +2476,7 @@  discard block
 block discarded – undo
2476 2476
             if (!is_numeric($arg)) {
2477 2477
                 $arg = \PhpOffice\PhpSpreadsheet\Calculation::wrapResult(strtoupper($arg));
2478 2478
             }
2479
-            $testCondition = '='.$arg.$condition;
2479
+            $testCondition = '=' . $arg . $condition;
2480 2480
             if (\PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
2481 2481
                 if ((is_null($returnValue)) || ($arg < $returnValue)) {
2482 2482
                     $returnValue = $arg;
Please login to merge, or discard this patch.