Passed
Push — master ( 20aac0...5868f8 )
by
unknown
20:33 queued 08:57
created
Calculation/Financial/CashFlow/Constant/Periodic/Interest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         mixed $presentValue,
38 38
         mixed $futureValue = 0,
39 39
         mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD
40
-    ): string|float {
40
+    ): string | float {
41 41
         $interestRate = Functions::flattenSingleValue($interestRate);
42 42
         $period = Functions::flattenSingleValue($period);
43 43
         $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param mixed $numberOfPeriods is the number of payments for the annuity
88 88
      * @param mixed $principleRemaining is the loan amount or present value of the payments
89 89
      */
90
-    public static function schedulePayment(mixed $interestRate, mixed $period, mixed $numberOfPeriods, mixed $principleRemaining): string|float
90
+    public static function schedulePayment(mixed $interestRate, mixed $period, mixed $numberOfPeriods, mixed $principleRemaining): string | float
91 91
     {
92 92
         $interestRate = Functions::flattenSingleValue($interestRate);
93 93
         $period = Functions::flattenSingleValue($period);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         mixed $futureValue = 0.0,
157 157
         mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD,
158 158
         mixed $guess = 0.1
159
-    ): string|float {
159
+    ): string | float {
160 160
         $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
161 161
         $payment = Functions::flattenSingleValue($payment);
162 162
         $presentValue = Functions::flattenSingleValue($presentValue);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         return $close ? $rate : ExcelError::NAN();
194 194
     }
195 195
 
196
-    private static function rateNextGuess(float $rate, float $numberOfPeriods, float $payment, float $presentValue, float $futureValue, int $type): string|float
196
+    private static function rateNextGuess(float $rate, float $numberOfPeriods, float $payment, float $presentValue, float $futureValue, int $type): string | float
197 197
     {
198 198
         if ($rate == 0.0) {
199 199
             return ExcelError::NAN();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4648,7 +4648,7 @@
 block discarded – undo
4648 4648
      * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets,
4649 4649
      * in which case an Exception is thrown.
4650 4650
      */
4651
-    protected function readSheetRangeByRefIndex(int $index): string|false
4651
+    protected function readSheetRangeByRefIndex(int $index): string | false
4652 4652
     {
4653 4653
         if (isset($this->ref[$index])) {
4654 4654
             $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type'];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     {
300 300
     }*/
301 301
 
302
-    private function readCFFormula(string $recordData, int $offset, int $size, Xls $xls): float|int|string|null
302
+    private function readCFFormula(string $recordData, int $offset, int $size, Xls $xls): float | int | string | null
303 303
     {
304 304
         try {
305 305
             $formula = substr($recordData, $offset, $size);
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
     }
318 318
 
319
-    private function setCFRules(array $cellRanges, string $type, string $operator, null|float|int|string $formula1, null|float|int|string $formula2, Style $style, bool $noFormatSet, Xls $xls): void
319
+    private function setCFRules(array $cellRanges, string $type, string $operator, null | float | int | string $formula1, null | float | int | string $formula2, Style $style, bool $noFormatSet, Xls $xls): void
320 320
     {
321 321
         foreach ($cellRanges as $cellRange) {
322 322
             $conditional = new Conditional();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/XlsBase.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
     // should be consistent with Writer\Xls\Style\CellBorder
111 111
     final const BORDER_STYLE_MAP = [
112 112
         Border::BORDER_NONE, // => 0x00,
113
-        Border::BORDER_THIN,  // => 0x01,
113
+        Border::BORDER_THIN, // => 0x01,
114 114
         Border::BORDER_MEDIUM, // => 0x02,
115 115
         Border::BORDER_DASHED, // => 0x03,
116
-        Border::BORDER_DOTTED,  // => 0x04,
116
+        Border::BORDER_DOTTED, // => 0x04,
117 117
         Border::BORDER_THICK, // => 0x05,
118 118
         Border::BORDER_DOUBLE, // => 0x06,
119 119
         Border::BORDER_HAIR, // => 0x07,
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      *
276 276
      * @param string $data Binary string that is at least 8 bytes long
277 277
      */
278
-    protected static function extractNumber(string $data): int|float
278
+    protected static function extractNumber(string $data): int | float
279 279
     {
280 280
         $rknumhigh = self::getInt4d($data, 4);
281 281
         $rknumlow = self::getInt4d($data, 0);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         return $value;
301 301
     }
302 302
 
303
-    protected static function getIEEE754(int $rknum): float|int
303
+    protected static function getIEEE754(int $rknum): float | int
304 304
     {
305 305
         if (($rknum & 0x02) != 0) {
306 306
             $value = $rknum >> 2;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @return bool TRUE if the year is a leap year, otherwise FALSE
19 19
      */
20
-    public static function isLeapYear(int|string $year): bool
20
+    public static function isLeapYear(int | string $year): bool
21 21
     {
22 22
         $year = (int) $year;
23 23
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @return float|string Excel date/time serial value, or string if error
64 64
      */
65
-    public static function getTimeValue(string $timeValue): string|float
65
+    public static function getTimeValue(string $timeValue): string | float
66 66
     {
67 67
         $saveReturnDateType = Functions::getReturnDateType();
68 68
         Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * Return result in one of three formats.
130 130
      */
131
-    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime|float|int
131
+    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime | float | int
132 132
     {
133 133
         $retType = Functions::getReturnDateType();
134 134
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     /**
162 162
      * Return result in one of three formats.
163 163
      */
164
-    public static function returnIn3FormatsFloat(float $excelDateValue): float|int|DateTime
164
+    public static function returnIn3FormatsFloat(float $excelDateValue): float | int | DateTime
165 165
     {
166 166
         $retType = Functions::getReturnDateType();
167 167
         if ($retType === Functions::RETURNDATE_EXCEL) {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     /**
179 179
      * Return result in one of three formats.
180 180
      */
181
-    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime|float|int
181
+    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime | float | int
182 182
     {
183 183
         $retType = Functions::getReturnDateType();
184 184
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     /**
224 224
      * Many functions accept null argument treated as 0.
225 225
      */
226
-    public static function validateNumericNull(mixed $number): int|float
226
+    public static function validateNumericNull(mixed $number): int | float
227 227
     {
228 228
         $number = Functions::flattenSingleValue($number);
229 229
         if ($number === null) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
      *
281 281
      * @param array|false $dateArray
282 282
      */
283
-    private static function forceArray(array|bool $dateArray): array
283
+    private static function forceArray(array | bool $dateArray): array
284 284
     {
285 285
         return is_array($dateArray) ? $dateArray : ['error_count' => 1];
286 286
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     }
109 109
 
110 110
     /** @return false|SimpleXMLElement */
111
-    private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement|bool
111
+    private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement | bool
112 112
     {
113 113
         $this->xmlFailMessage = "Cannot load invalid XML $fileOrString: " . $filename;
114 114
         $xml = false;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         return array_key_exists($key, self::$excelConstants);
215 215
     }
216 216
 
217
-    public static function getExcelConstants(string $key): bool|null
217
+    public static function getExcelConstants(string $key): bool | null
218 218
     {
219 219
         return self::$excelConstants[$key];
220 220
     }
@@ -3314,9 +3314,9 @@  discard block
 block discarded – undo
3314 3314
         return $formula;
3315 3315
     }
3316 3316
 
3317
-    private static ?array $functionReplaceFromExcel;
3317
+    private static ? array $functionReplaceFromExcel;
3318 3318
 
3319
-    private static ?array $functionReplaceToLocale;
3319
+    private static ? array $functionReplaceToLocale;
3320 3320
 
3321 3321
     public function translateFormulaToLocale(string $formula): string
3322 3322
     {
@@ -3351,9 +3351,9 @@  discard block
 block discarded – undo
3351 3351
         );
3352 3352
     }
3353 3353
 
3354
-    private static ?array $functionReplaceFromLocale;
3354
+    private static ? array $functionReplaceFromLocale;
3355 3355
 
3356
-    private static ?array $functionReplaceToExcel;
3356
+    private static ? array $functionReplaceToExcel;
3357 3357
 
3358 3358
     public function translateFormulaToEnglish(string $formula): string
3359 3359
     {
@@ -3538,7 +3538,7 @@  discard block
 block discarded – undo
3538 3538
      *
3539 3539
      * @param string $formula Formula to parse
3540 3540
      */
3541
-    public function parseFormula(string $formula): array|bool
3541
+    public function parseFormula(string $formula): array | bool
3542 3542
     {
3543 3543
         $formula = preg_replace_callback(
3544 3544
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -3941,7 +3941,7 @@  discard block
 block discarded – undo
3941 3941
     /**
3942 3942
      * @return false|string False indicates an error
3943 3943
      */
3944
-    private function convertMatrixReferences(string $formula): false|string
3944
+    private function convertMatrixReferences(string $formula): false | string
3945 3945
     {
3946 3946
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
3947 3947
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -4036,7 +4036,7 @@  discard block
 block discarded – undo
4036 4036
     /**
4037 4037
      * @return array<int, mixed>|false
4038 4038
      */
4039
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
4039
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
4040 4040
     {
4041 4041
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
4042 4042
             return false;
@@ -5210,7 +5210,7 @@  discard block
 block discarded – undo
5210 5210
         return true;
5211 5211
     }
5212 5212
 
5213
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
5213
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
5214 5214
     {
5215 5215
         $result = [];
5216 5216
         if (!is_array($operand2)) {
@@ -5249,7 +5249,7 @@  discard block
 block discarded – undo
5249 5249
         return $result;
5250 5250
     }
5251 5251
 
5252
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
5252
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
5253 5253
     {
5254 5254
         //    If we're dealing with matrix operations, we want a matrix result
5255 5255
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -5266,7 +5266,7 @@  discard block
 block discarded – undo
5266 5266
         return $result;
5267 5267
     }
5268 5268
 
5269
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
5269
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
5270 5270
     {
5271 5271
         //    Validate the two operands
5272 5272
         if (
@@ -5483,7 +5483,7 @@  discard block
 block discarded – undo
5483 5483
      *
5484 5484
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
5485 5485
      */
5486
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
5486
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
5487 5487
     {
5488 5488
         // Return value
5489 5489
         $returnValue = [];
@@ -5624,7 +5624,7 @@  discard block
 block discarded – undo
5624 5624
     /**
5625 5625
      * Add cell reference if needed while making sure that it is the last argument.
5626 5626
      */
5627
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
5627
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
5628 5628
     {
5629 5629
         if ($passCellReference) {
5630 5630
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Cell/StringableObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 
7 7
 class StringableObject
8 8
 {
9
-    private int|string $value;
9
+    private int | string $value;
10 10
 
11
-    public function __construct(int|string $value = 'abc')
11
+    public function __construct(int | string $value = 'abc')
12 12
     {
13 13
         $this->value = $value;
14 14
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         }
377 377
     }
378 378
 
379
-    private function processMemoryDrawing(BstoreContainer &$bstoreContainer, MemoryDrawing $drawing, string $renderingFunctionx): void
379
+    private function processMemoryDrawing(BstoreContainer & $bstoreContainer, MemoryDrawing $drawing, string $renderingFunctionx): void
380 380
     {
381 381
         switch ($renderingFunctionx) {
382 382
             case MemoryDrawing::RENDERING_JPEG:
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 
409 409
     private static int $two = 2; // phpstan silliness
410 410
 
411
-    private function processDrawing(BstoreContainer &$bstoreContainer, Drawing $drawing): void
411
+    private function processDrawing(BstoreContainer & $bstoreContainer, Drawing $drawing): void
412 412
     {
413 413
         $blipType = 0;
414 414
         $blipData = '';
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
         }
466 466
     }
467 467
 
468
-    private function processBaseDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void
468
+    private function processBaseDrawing(BstoreContainer & $bstoreContainer, BaseDrawing $drawing): void
469 469
     {
470 470
         if ($drawing instanceof Drawing && $drawing->getPath() !== '') {
471 471
             $this->processDrawing($bstoreContainer, $drawing);
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
         return $data;
753 753
     }
754 754
 
755
-    private function writeSummaryPropOle(float|int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void
755
+    private function writeSummaryPropOle(float | int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void
756 756
     {
757 757
         if ($dataProp) {
758 758
             $dataSection[] = [
Please login to merge, or discard this patch.