@@ -2870,8 +2870,8 @@ |
||
2870 | 2870 | ]; |
2871 | 2871 | |
2872 | 2872 | public function __construct(/** |
2873 | - * Instance of the spreadsheet this Calculation Engine is using. |
|
2874 | - */ |
|
2873 | + * Instance of the spreadsheet this Calculation Engine is using. |
|
2874 | + */ |
|
2875 | 2875 | private ?Spreadsheet $spreadsheet = null |
2876 | 2876 | ) { |
2877 | 2877 | $this->cyclicReferenceStack = new CyclicReferenceStack(); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | return array_key_exists($key, self::$excelConstants); |
204 | 204 | } |
205 | 205 | |
206 | - public static function getExcelConstants(string $key): bool|null |
|
206 | + public static function getExcelConstants(string $key): bool | null |
|
207 | 207 | { |
208 | 208 | return self::$excelConstants[$key]; |
209 | 209 | } |
@@ -3270,10 +3270,10 @@ discard block |
||
3270 | 3270 | } |
3271 | 3271 | |
3272 | 3272 | /** @var ?array */ |
3273 | - private static ?array $functionReplaceFromExcel = null; |
|
3273 | + private static ? array $functionReplaceFromExcel = null; |
|
3274 | 3274 | |
3275 | 3275 | /** @var ?array */ |
3276 | - private static ?array $functionReplaceToLocale = null; |
|
3276 | + private static ? array $functionReplaceToLocale = null; |
|
3277 | 3277 | |
3278 | 3278 | /** |
3279 | 3279 | * @deprecated 1.30.0 use translateFormulaToLocale() instead |
@@ -3319,10 +3319,10 @@ discard block |
||
3319 | 3319 | } |
3320 | 3320 | |
3321 | 3321 | /** @var ?array */ |
3322 | - private static ?array $functionReplaceFromLocale = null; |
|
3322 | + private static ? array $functionReplaceFromLocale = null; |
|
3323 | 3323 | |
3324 | 3324 | /** @var ?array */ |
3325 | - private static ?array $functionReplaceToExcel = null; |
|
3325 | + private static ? array $functionReplaceToExcel = null; |
|
3326 | 3326 | |
3327 | 3327 | /** |
3328 | 3328 | * @deprecated 1.30.0 use translateFormulaToEnglish() instead |
@@ -3530,7 +3530,7 @@ discard block |
||
3530 | 3530 | * |
3531 | 3531 | * @param string $formula Formula to parse |
3532 | 3532 | */ |
3533 | - public function parseFormula(string $formula): array|bool |
|
3533 | + public function parseFormula(string $formula): array | bool |
|
3534 | 3534 | { |
3535 | 3535 | // Basic validation that this is indeed a formula |
3536 | 3536 | // We return an empty array if not |
@@ -3924,7 +3924,7 @@ discard block |
||
3924 | 3924 | /** |
3925 | 3925 | * @return false|string False indicates an error |
3926 | 3926 | */ |
3927 | - private function convertMatrixReferences(string $formula): false|string |
|
3927 | + private function convertMatrixReferences(string $formula): false | string |
|
3928 | 3928 | { |
3929 | 3929 | static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE]; |
3930 | 3930 | static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; |
@@ -4019,7 +4019,7 @@ discard block |
||
4019 | 4019 | /** |
4020 | 4020 | * @return array<int, mixed>|false |
4021 | 4021 | */ |
4022 | - private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array |
|
4022 | + private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array |
|
4023 | 4023 | { |
4024 | 4024 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
4025 | 4025 | return false; |
@@ -5150,7 +5150,7 @@ discard block |
||
5150 | 5150 | return true; |
5151 | 5151 | } |
5152 | 5152 | |
5153 | - private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array |
|
5153 | + private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array |
|
5154 | 5154 | { |
5155 | 5155 | $result = []; |
5156 | 5156 | if (!is_array($operand2)) { |
@@ -5189,7 +5189,7 @@ discard block |
||
5189 | 5189 | return $result; |
5190 | 5190 | } |
5191 | 5191 | |
5192 | - private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool |
|
5192 | + private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool |
|
5193 | 5193 | { |
5194 | 5194 | // If we're dealing with matrix operations, we want a matrix result |
5195 | 5195 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -5206,7 +5206,7 @@ discard block |
||
5206 | 5206 | return $result; |
5207 | 5207 | } |
5208 | 5208 | |
5209 | - private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed |
|
5209 | + private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed |
|
5210 | 5210 | { |
5211 | 5211 | // Validate the two operands |
5212 | 5212 | if ( |
@@ -5411,7 +5411,7 @@ discard block |
||
5411 | 5411 | * |
5412 | 5412 | * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned. |
5413 | 5413 | */ |
5414 | - public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array |
|
5414 | + public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array |
|
5415 | 5415 | { |
5416 | 5416 | // Return value |
5417 | 5417 | $returnValue = []; |
@@ -5552,7 +5552,7 @@ discard block |
||
5552 | 5552 | /** |
5553 | 5553 | * Add cell reference if needed while making sure that it is the last argument. |
5554 | 5554 | */ |
5555 | - private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array |
|
5555 | + private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array |
|
5556 | 5556 | { |
5557 | 5557 | if ($passCellReference) { |
5558 | 5558 | if (is_array($functionCall)) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | /** |
37 | 37 | * The object we are writing. |
38 | 38 | */ |
39 | - private Blip|BSE|BstoreContainer|DgContainer|DggContainer|self|SpContainer|SpgrContainer|SharedEscher $object |
|
39 | + private Blip | BSE | BstoreContainer | DgContainer | DggContainer | self | SpContainer | SpgrContainer | SharedEscher $object |
|
40 | 40 | ) { |
41 | 41 | } |
42 | 42 |
@@ -15,8 +15,8 @@ |
||
15 | 15 | * Constructor. |
16 | 16 | */ |
17 | 17 | public function __construct(/** |
18 | - * Font. |
|
19 | - */ |
|
18 | + * Font. |
|
19 | + */ |
|
20 | 20 | private \PhpOffice\PhpSpreadsheet\Style\Font $font |
21 | 21 | ) { |
22 | 22 | $this->colorIndex = 0x7FFF; |
@@ -123,8 +123,8 @@ |
||
123 | 123 | * Create a new HTML. |
124 | 124 | */ |
125 | 125 | public function __construct(/** |
126 | - * Spreadsheet object. |
|
127 | - */ |
|
126 | + * Spreadsheet object. |
|
127 | + */ |
|
128 | 128 | protected Spreadsheet $spreadsheet |
129 | 129 | ) { |
130 | 130 | $this->defaultFont = $this->spreadsheet->getDefaultStyle()->getFont(); |
@@ -318,8 +318,8 @@ |
||
318 | 318 | * Create a new worksheet. |
319 | 319 | */ |
320 | 320 | public function __construct(/** |
321 | - * Parent spreadsheet. |
|
322 | - */ |
|
321 | + * Parent spreadsheet. |
|
322 | + */ |
|
323 | 323 | private ?Spreadsheet $parent = null, |
324 | 324 | string $title = 'Worksheet' |
325 | 325 | ) { |
@@ -240,7 +240,7 @@ |
||
240 | 240 | * |
241 | 241 | * @param string $name Attribute Name |
242 | 242 | */ |
243 | - public function getAttribute(string $name): null|int|string |
|
243 | + public function getAttribute(string $name): null | int | string |
|
244 | 244 | { |
245 | 245 | return $this->attributes[$name] ?? null; |
246 | 246 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * or an AddressRange object. |
50 | 50 | */ |
51 | 51 | public function __construct( |
52 | - AddressRange|string|array $range = '', /** |
|
52 | + AddressRange | string | array $range = '', /** |
|
53 | 53 | * Autofilter Worksheet. |
54 | 54 | */ |
55 | 55 | private ?Worksheet $workSheet = null |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** |
70 | 70 | * Get AutoFilter Parent Worksheet. |
71 | 71 | */ |
72 | - public function getParent(): null|Worksheet |
|
72 | + public function getParent(): null | Worksheet |
|
73 | 73 | { |
74 | 74 | return $this->workSheet; |
75 | 75 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), |
104 | 104 | * or an AddressRange object. |
105 | 105 | */ |
106 | - public function setRange(AddressRange|string|array $range = ''): self |
|
106 | + public function setRange(AddressRange | string | array $range = ''): self |
|
107 | 107 | { |
108 | 108 | $this->evaluated = false; |
109 | 109 | // extract coordinate |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * |
232 | 232 | * @return $this |
233 | 233 | */ |
234 | - public function setColumn(AutoFilter\Column|string $columnObjectOrString): static |
|
234 | + public function setColumn(AutoFilter\Column | string $columnObjectOrString): static |
|
235 | 235 | { |
236 | 236 | $this->evaluated = false; |
237 | 237 | if ((is_string($columnObjectOrString)) && (!empty($columnObjectOrString))) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * @param array{0: int, 1: int}|CellAddress|string $coordinate |
15 | 15 | */ |
16 | - public function __construct(private int $breakType, CellAddress|string|array $coordinate, private int $maxColOrRow = -1) |
|
16 | + public function __construct(private int $breakType, CellAddress | string | array $coordinate, private int $maxColOrRow = -1) |
|
17 | 17 | { |
18 | 18 | $coordinate = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate)); |
19 | 19 | $this->coordinate = $coordinate; |
@@ -93,8 +93,8 @@ |
||
93 | 93 | * @throws SpreadsheetException |
94 | 94 | */ |
95 | 95 | public function __construct(/** |
96 | - * Value of the cell. |
|
97 | - */ |
|
96 | + * Value of the cell. |
|
97 | + */ |
|
98 | 98 | private mixed $value, |
99 | 99 | ?string $dataType, |
100 | 100 | Worksheet $worksheet |