Passed
Pull Request — master (#3718)
by Adrien
19:29 queued 04:31
created
Category
src/PhpSpreadsheet/Reader/Xlsx/Chart.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->aNamespace = $aNamespace;
35 35
     }
36 36
 
37
-    private static function getAttributeString(SimpleXMLElement $component, string $name): string|null
37
+    private static function getAttributeString(SimpleXMLElement $component, string $name): string | null
38 38
     {
39 39
         $attributes = $component->attributes();
40 40
         if (@isset($attributes[$name])) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         return null;
45 45
     }
46 46
 
47
-    private static function getAttributeInteger(SimpleXMLElement $component, string $name): int|null
47
+    private static function getAttributeInteger(SimpleXMLElement $component, string $name): int | null
48 48
     {
49 49
         $attributes = $component->attributes();
50 50
         if (@isset($attributes[$name])) {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         return null;
55 55
     }
56 56
 
57
-    private static function getAttributeBoolean(SimpleXMLElement $component, string $name): bool|null
57
+    private static function getAttributeBoolean(SimpleXMLElement $component, string $name): bool | null
58 58
     {
59 59
         $attributes = $component->attributes();
60 60
         if (@isset($attributes[$name])) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         return null;
67 67
     }
68 68
 
69
-    private static function getAttributeFloat(SimpleXMLElement $component, string $name): float|null
69
+    private static function getAttributeFloat(SimpleXMLElement $component, string $name): float | null
70 70
     {
71 71
         $attributes = $component->attributes();
72 72
         if (@isset($attributes[$name])) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7352,7 +7352,7 @@  discard block
 block discarded – undo
7352 7352
      * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets,
7353 7353
      * in which case an Exception is thrown.
7354 7354
      */
7355
-    private function readSheetRangeByRefIndex(int $index): string|false
7355
+    private function readSheetRangeByRefIndex(int $index): string | false
7356 7356
     {
7357 7357
         if (isset($this->ref[$index])) {
7358 7358
             $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type'];
@@ -7649,7 +7649,7 @@  discard block
 block discarded – undo
7649 7649
      *
7650 7650
      * @return float
7651 7651
      */
7652
-    private static function extractNumber($data): int|float
7652
+    private static function extractNumber($data): int | float
7653 7653
     {
7654 7654
         $rknumhigh = self::getInt4d($data, 4);
7655 7655
         $rknumlow = self::getInt4d($data, 0);
@@ -7677,7 +7677,7 @@  discard block
 block discarded – undo
7677 7677
      *
7678 7678
      * @return float
7679 7679
      */
7680
-    private static function getIEEE754($rknum): float|int
7680
+    private static function getIEEE754($rknum): float | int
7681 7681
     {
7682 7682
         if (($rknum & 0x02) != 0) {
7683 7683
             $value = $rknum >> 2;
@@ -7988,7 +7988,7 @@  discard block
 block discarded – undo
7988 7988
     {
7989 7989
     }
7990 7990
 
7991
-    private function readCFFormula(string $recordData, int $offset, int $size): float|int|string|null
7991
+    private function readCFFormula(string $recordData, int $offset, int $size): float | int | string | null
7992 7992
     {
7993 7993
         try {
7994 7994
             $formula = substr($recordData, $offset, $size);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls/ErrorCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      *
20 20
      * @param int $code
21 21
      */
22
-    public static function lookup($code): string|bool
22
+    public static function lookup($code): string | bool
23 23
     {
24 24
         return self::ERROR_CODE_MAP[$code] ?? false;
25 25
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Csv/Delimiter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
             $meanSquareDeviations[$delimiter] = array_reduce(
94 94
                 $series,
95
-                function ($sum, $value) use ($median): int|float {
95
+                function ($sum, $value) use ($median): int | float {
96 96
                     return $sum + ($value - $median) ** 2;
97 97
                 }
98 98
             ) / count($series);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -445,7 +445,7 @@
 block discarded – undo
445 445
      * @deprecated 1.23.0 Use the isLogical() method in the Information\Value class instead
446 446
      * @see Information\Value::isLogical()
447 447
      */
448
-    public static function isLogical($value = null): bool|array
448
+    public static function isLogical($value = null): bool | array
449 449
     {
450 450
         return Information\Value::isLogical($value);
451 451
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      *
322 322
      * @return float|string Excel date/time serial value or error message
323 323
      */
324
-    public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0): string|float
324
+    public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0): string | float
325 325
     {
326 326
         return Coupons::COUPNCD($settlement, $maturity, $frequency, $basis);
327 327
     }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      *
395 395
      * @return float|string Excel date/time serial value or error message
396 396
      */
397
-    public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0): string|float
397
+    public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0): string | float
398 398
     {
399 399
         return Coupons::COUPPCD($settlement, $maturity, $frequency, $basis);
400 400
     }
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      * @param array|float $fractional_dollar Fractional Dollar
573 573
      * @param array|int $fraction Fraction
574 574
      */
575
-    public static function DOLLARDE($fractional_dollar = null, $fraction = 0): string|float|array
575
+    public static function DOLLARDE($fractional_dollar = null, $fraction = 0): string | float | array
576 576
     {
577 577
         return Dollar::decimal($fractional_dollar, $fraction);
578 578
     }
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      * @param array|float $decimal_dollar Decimal Dollar
595 595
      * @param array|int $fraction Fraction
596 596
      */
597
-    public static function DOLLARFR($decimal_dollar = null, $fraction = 0): string|float|array
597
+    public static function DOLLARFR($decimal_dollar = null, $fraction = 0): string | float | array
598 598
     {
599 599
         return Dollar::fractional($decimal_dollar, $fraction);
600 600
     }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      * @param float $nominalRate Nominal interest rate
616 616
      * @param int $periodsPerYear Number of compounding payments per year
617 617
      */
618
-    public static function EFFECT($nominalRate = 0, $periodsPerYear = 0): string|float
618
+    public static function EFFECT($nominalRate = 0, $periodsPerYear = 0): string | float
619 619
     {
620 620
         return Financial\InterestRate::effective($nominalRate, $periodsPerYear);
621 621
     }
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
      *                                0 or omitted    At the end of the period.
644 644
      *                                1                At the beginning of the period.
645 645
      */
646
-    public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0): string|float
646
+    public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0): string | float
647 647
     {
648 648
         return Financial\CashFlow\Constant\Periodic::futureValue($rate, $nper, $pmt, $pv, $type);
649 649
     }
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
      * @param float $fv Future Value
725 725
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
726 726
      */
727
-    public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string|float
727
+    public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string | float
728 728
     {
729 729
         return Financial\CashFlow\Constant\Periodic\Interest::payment($rate, $per, $nper, $pv, $fv, $type);
730 730
     }
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
      *
831 831
      * @return float|string Result, or a string containing an error
832 832
      */
833
-    public static function NOMINAL($effectiveRate = 0, $periodsPerYear = 0): string|float
833
+    public static function NOMINAL($effectiveRate = 0, $periodsPerYear = 0): string | float
834 834
     {
835 835
         return InterestRate::nominal($effectiveRate, $periodsPerYear);
836 836
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
      *
937 937
      * @return float|string Result, or a string containing an error
938 938
      */
939
-    public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string|float
939
+    public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string | float
940 940
     {
941 941
         return Financial\CashFlow\Constant\Periodic\Payments::interestPayment($rate, $per, $nper, $pv, $fv, $type);
942 942
     }
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
      *
972 972
      * @return float|string Result, or a string containing an error
973 973
      */
974
-    public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0): string|float
974
+    public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0): string | float
975 975
     {
976 976
         return Securities\Price::price($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
977 977
     }
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
      *
1055 1055
      * @return float|string Result, or a string containing an error
1056 1056
      */
1057
-    public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0): string|float
1057
+    public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0): string | float
1058 1058
     {
1059 1059
         return Financial\CashFlow\Constant\Periodic::presentValue($rate, $nper, $pmt, $fv, $type);
1060 1060
     }
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
      *
1207 1207
      * @return float|string Result, or a string containing an error
1208 1208
      */
1209
-    public static function TBILLEQ($settlement, $maturity, $discount): string|float
1209
+    public static function TBILLEQ($settlement, $maturity, $discount): string | float
1210 1210
     {
1211 1211
         return TreasuryBill::bondEquivalentYield($settlement, $maturity, $discount);
1212 1212
     }
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
      *
1230 1230
      * @return float|string Result, or a string containing an error
1231 1231
      */
1232
-    public static function TBILLPRICE($settlement, $maturity, $discount): string|float
1232
+    public static function TBILLPRICE($settlement, $maturity, $discount): string | float
1233 1233
     {
1234 1234
         return TreasuryBill::price($settlement, $maturity, $discount);
1235 1235
     }
@@ -1250,7 +1250,7 @@  discard block
 block discarded – undo
1250 1250
      *                                The maturity date is the date when the Treasury bill expires.
1251 1251
      * @param mixed $price The Treasury bill's price per $100 face value
1252 1252
      */
1253
-    public static function TBILLYIELD($settlement, $maturity, $price): string|float
1253
+    public static function TBILLYIELD($settlement, $maturity, $price): string | float
1254 1254
     {
1255 1255
         return TreasuryBill::yield($settlement, $maturity, $price);
1256 1256
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Database.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @TODO    The field argument is optional. If field is omitted, DCOUNT counts all records in the
75 75
      *            database that match the criteria.
76 76
      */
77
-    public static function DCOUNT($database, $field, $criteria): string|int
77
+    public static function DCOUNT($database, $field, $criteria): string | int
78 78
     {
79 79
         return Database\DCount::evaluate($database, $field, $criteria);
80 80
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *                                        the column label in which you specify a condition for the
107 107
      *                                        column.
108 108
      */
109
-    public static function DCOUNTA($database, $field, $criteria): string|int
109
+    public static function DCOUNTA($database, $field, $criteria): string | int
110 110
     {
111 111
         return Database\DCountA::evaluate($database, $field, $criteria);
112 112
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
78 78
      *            with the same dimensions
79 79
      */
80
-    public static function toHex($value, $places = null): array|string
80
+    public static function toHex($value, $places = null): array | string
81 81
     {
82 82
         if (is_array($value) || is_array($places)) {
83 83
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
131 131
      *            with the same dimensions
132 132
      */
133
-    public static function toOctal($value, $places = null): array|string
133
+    public static function toOctal($value, $places = null): array | string
134 134
     {
135 135
         if (is_array($value) || is_array($places)) {
136 136
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/BesselI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
36 36
      *            with the same dimensions
37 37
      */
38
-    public static function BESSELI($x, $ord): array|string|float
38
+    public static function BESSELI($x, $ord): array | string | float
39 39
     {
40 40
         if (is_array($x) || is_array($ord)) {
41 41
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $ord);
Please login to merge, or discard this patch.