Skip to content

Commit a974933

Browse files
authored
Merge branch 'master' into datetext
2 parents 04c0a79 + 33f8fc1 commit a974933

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+126
-125
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
'standardize_not_equals' => true,
222222
'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
223223
'strict_comparison' => false, // No, too dangerous to change that
224-
'string_implicit_backslashes' => false, // was escape_implicit_backslashes, too confusing
224+
'string_implicit_backslashes' => ['single_quoted' => 'unescape', 'double_quoted' => 'escape', 'heredoc' => 'escape'], // was escape_implicit_backslashes
225225
'strict_param' => false, // No, too dangerous to change that
226226
'string_length_to_empty' => true,
227227
'string_line_ending' => true,

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"platform": {
1616
"php" : "8.1.99"
1717
},
18+
"process-timeout": 600,
1819
"sort-packages": true,
1920
"allow-plugins": {
2021
"dealerdirect/phpcodesniffer-composer-installer": true

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Calculation
5252
// Defined Names: Named Range of cells, or Named Formulae
5353
const CALCULATION_REGEXP_DEFINEDNAME = '((([^\s,!&%^\/\*\+<>=-]*)|(\'(?:[^\']|\'[^!])+?\')|(\"(?:[^\"]|\"[^!])+?\"))!)?([_\p{L}][_\p{L}\p{N}\.]*)';
5454
// Structured Reference (Fully Qualified and Unqualified)
55-
const CALCULATION_REGEXP_STRUCTURED_REFERENCE = '([\p{L}_\\\\][\p{L}\p{N}\._]+)?(\[(?:[^\d\]+-])?)';
55+
const CALCULATION_REGEXP_STRUCTURED_REFERENCE = '([\p{L}_\\\][\p{L}\p{N}\._]+)?(\[(?:[^\d\]+-])?)';
5656
// Error
5757
const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?';
5858

src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function fromString(null|array|string|int|bool|float $dateValue):
4747
}
4848

4949
// try to parse as date iff there is at least one digit
50-
if (is_string($dateValue) && preg_match('/\\d/', $dateValue) !== 1) {
50+
if (is_string($dateValue) && preg_match('/\d/', $dateValue) !== 1) {
5151
return ExcelError::VALUE();
5252
}
5353

src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class StructuredReference implements Operand, Stringable
2929
self::ITEM_SPECIFIER_TOTALS,
3030
];
3131

32-
private const TABLE_REFERENCE = '/([\p{L}_\\\\][\p{L}\p{N}\._]+)?(\[(?:[^\]\[]+|(?R))*+\])/miu';
32+
private const TABLE_REFERENCE = '/([\p{L}_\\\][\p{L}\p{N}\._]+)?(\[(?:[^\]\[]+|(?R))*+\])/miu';
3333

3434
private string $value;
3535

src/PhpSpreadsheet/Calculation/FormulaParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private function parseToTokens(): void
213213
// scientific notation check
214214
if (str_contains(self::OPERATORS_SN, $this->formula[$index])) {
215215
if (strlen($value) > 1) {
216-
if (preg_match('/^[1-9]{1}(\\.\\d+)?E{1}$/', $this->formula[$index]) != 0) {
216+
if (preg_match('/^[1-9]{1}(\.\d+)?E{1}$/', $this->formula[$index]) != 0) {
217217
$value .= $this->formula[$index];
218218
++$index;
219219

src/PhpSpreadsheet/Calculation/Functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public static function expandDefinedName(string $coordinate, Cell $cell): string
338338

339339
public static function trimTrailingRange(string $coordinate): string
340340
{
341-
return (string) preg_replace('/:[\\w\$]+$/', '', $coordinate);
341+
return (string) preg_replace('/:[\w\$]+$/', '', $coordinate);
342342
}
343343

344344
public static function trimSheetFromCellReference(string $coordinate): string

src/PhpSpreadsheet/Calculation/Internal/WildcardMatch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class WildcardMatch
66
{
77
private const SEARCH_SET = [
88
'~~', // convert double tilde to unprintable value
9-
'~\\*', // convert tilde backslash asterisk to [*] (matches literal asterisk in regexp)
10-
'\\*', // convert backslash asterisk to .* (matches string of any length in regexp)
11-
'~\\?', // convert tilde backslash question to [?] (matches literal question mark in regexp)
12-
'\\?', // convert backslash question to . (matches one character in regexp)
9+
'~\*', // convert tilde backslash asterisk to [*] (matches literal asterisk in regexp)
10+
'\*', // convert backslash asterisk to .* (matches string of any length in regexp)
11+
'~\?', // convert tilde backslash question to [?] (matches literal question mark in regexp)
12+
'\?', // convert backslash question to . (matches one character in regexp)
1313
"\x1c", // convert original double tilde to single tilde
1414
];
1515

src/PhpSpreadsheet/Calculation/TextData/Trim.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function nonPrintable(mixed $stringValue = '')
2525

2626
$stringValue = Helpers::extractString($stringValue);
2727

28-
return (string) preg_replace('/[\\x00-\\x1f]/', '', "$stringValue");
28+
return (string) preg_replace('/[\x00-\x1f]/', '', "$stringValue");
2929
}
3030

3131
/**

src/PhpSpreadsheet/Cell/DefaultValueBinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function dataTypeForValue(mixed $value): string
8989

9090
return DataType::TYPE_FORMULA;
9191
}
92-
if (preg_match('/^[\+\-]?(\d+\\.?\d*|\d*\\.?\d+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $value)) {
92+
if (preg_match('/^[\+\-]?(\d+\.?\d*|\d*\.?\d+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $value)) {
9393
$tValue = ltrim($value, '+-');
9494
if (strlen($tValue) > 1 && $tValue[0] === '0' && $tValue[1] !== '.') {
9595
return DataType::TYPE_STRING;

0 commit comments

Comments
 (0)