@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @return int Horizontal measured in pixels |
105 | 105 | */ |
106 | - public static function getDistanceX(Worksheet $worksheet, string $startColumn = 'A', float|int $startOffsetX = 0, string $endColumn = 'A', float|int $endOffsetX = 0): int |
|
106 | + public static function getDistanceX(Worksheet $worksheet, string $startColumn = 'A', float | int $startOffsetX = 0, string $endColumn = 'A', float | int $endOffsetX = 0): int |
|
107 | 107 | { |
108 | 108 | $distanceX = 0; |
109 | 109 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * |
135 | 135 | * @return int Vertical distance measured in pixels |
136 | 136 | */ |
137 | - public static function getDistanceY(Worksheet $worksheet, int $startRow = 1, float|int $startOffsetY = 0, int $endRow = 1, float|int $endOffsetY = 0): int |
|
137 | + public static function getDistanceY(Worksheet $worksheet, int $startRow = 1, float | int $startOffsetY = 0, int $endRow = 1, float | int $endOffsetY = 0): int |
|
138 | 138 | { |
139 | 139 | $distanceY = 0; |
140 | 140 |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width. |
46 | 46 | */ |
47 | - private int|float $startOffsetX; |
|
47 | + private int | float $startOffsetX; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Vertical offset of upper-left corner of shape measured in 1/256 of row height. |
51 | 51 | */ |
52 | - private int|float $startOffsetY; |
|
52 | + private int | float $startOffsetY; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Cell coordinates of bottom-right corner of shape, e.g. 'B2'. |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | /** |
60 | 60 | * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width. |
61 | 61 | */ |
62 | - private int|float $endOffsetX; |
|
62 | + private int | float $endOffsetX; |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Vertical offset of bottom-right corner of shape measured in 1/256 of row height. |
66 | 66 | */ |
67 | - private int|float $endOffsetY; |
|
67 | + private int | float $endOffsetY; |
|
68 | 68 | |
69 | 69 | /** |
70 | 70 | * Set parent Shape Group Container. |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | /** |
200 | 200 | * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. |
201 | 201 | */ |
202 | - public function setStartOffsetX(int|float $startOffsetX): void |
|
202 | + public function setStartOffsetX(int | float $startOffsetX): void |
|
203 | 203 | { |
204 | 204 | $this->startOffsetX = $startOffsetX; |
205 | 205 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | /** |
208 | 208 | * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. |
209 | 209 | */ |
210 | - public function getStartOffsetX(): int|float |
|
210 | + public function getStartOffsetX(): int | float |
|
211 | 211 | { |
212 | 212 | return $this->startOffsetX; |
213 | 213 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height. |
217 | 217 | */ |
218 | - public function setStartOffsetY(int|float $startOffsetY): void |
|
218 | + public function setStartOffsetY(int | float $startOffsetY): void |
|
219 | 219 | { |
220 | 220 | $this->startOffsetY = $startOffsetY; |
221 | 221 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height. |
225 | 225 | */ |
226 | - public function getStartOffsetY(): int|float |
|
226 | + public function getStartOffsetY(): int | float |
|
227 | 227 | { |
228 | 228 | return $this->startOffsetY; |
229 | 229 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | /** |
250 | 250 | * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. |
251 | 251 | */ |
252 | - public function setEndOffsetX(int|float $endOffsetX): void |
|
252 | + public function setEndOffsetX(int | float $endOffsetX): void |
|
253 | 253 | { |
254 | 254 | $this->endOffsetX = $endOffsetX; |
255 | 255 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | /** |
258 | 258 | * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. |
259 | 259 | */ |
260 | - public function getEndOffsetX(): int|float |
|
260 | + public function getEndOffsetX(): int | float |
|
261 | 261 | { |
262 | 262 | return $this->endOffsetX; |
263 | 263 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | /** |
266 | 266 | * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. |
267 | 267 | */ |
268 | - public function setEndOffsetY(int|float $endOffsetY): void |
|
268 | + public function setEndOffsetY(int | float $endOffsetY): void |
|
269 | 269 | { |
270 | 270 | $this->endOffsetY = $endOffsetY; |
271 | 271 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | /** |
274 | 274 | * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. |
275 | 275 | */ |
276 | - public function getEndOffsetY(): int|float |
|
276 | + public function getEndOffsetY(): int | float |
|
277 | 277 | { |
278 | 278 | return $this->endOffsetY; |
279 | 279 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | * Formats a numeric value as a string for output in various output writers forcing |
336 | 336 | * point as decimal separator in case locale is other than English. |
337 | 337 | */ |
338 | - public static function formatNumber(float|int|string|null $numericValue): string |
|
338 | + public static function formatNumber(float | int | string | null $numericValue): string |
|
339 | 339 | { |
340 | 340 | if (is_float($numericValue)) { |
341 | 341 | return str_replace(',', '.', (string) $numericValue); |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | { |
391 | 391 | // characters |
392 | 392 | $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8'); |
393 | - $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642 |
|
393 | + $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642 |
|
394 | 394 | |
395 | 395 | return pack('vC', $ln, 0x0001) . $chars; |
396 | 396 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | * |
112 | 112 | * @return false|string |
113 | 113 | */ |
114 | - public function stream_read(int $count): bool|string // @codingStandardsIgnoreLine |
|
114 | + public function stream_read(int $count): bool | string // @codingStandardsIgnoreLine |
|
115 | 115 | { |
116 | 116 | if ($this->stream_eof()) { |
117 | 117 | return false; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * serialized timestamp. |
161 | 161 | * See https://en.wikipedia.org/wiki/ISO_8601 for details of the ISO-8601 standard format. |
162 | 162 | */ |
163 | - public static function convertIsoDate(mixed $value): float|int |
|
163 | + public static function convertIsoDate(mixed $value): float | int |
|
164 | 164 | { |
165 | 165 | if (!is_string($value)) { |
166 | 166 | throw new Exception('Non-string value supplied for Iso Date conversion'); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * |
307 | 307 | * @return false|float MS Excel serialized date/time value |
308 | 308 | */ |
309 | - public static function timestampToExcel($unixTimestamp): bool|float |
|
309 | + public static function timestampToExcel($unixTimestamp): bool | float |
|
310 | 310 | { |
311 | 311 | if (!is_numeric($unixTimestamp)) { |
312 | 312 | return false; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * @return float Excel date/time value |
322 | 322 | */ |
323 | - public static function formattedPHPToExcel(int $year, int $month, int $day, int $hours = 0, int $minutes = 0, float|int $seconds = 0): float |
|
323 | + public static function formattedPHPToExcel(int $year, int $month, int $day, int $hours = 0, int $minutes = 0, float | int $seconds = 0): float |
|
324 | 324 | { |
325 | 325 | if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) { |
326 | 326 | // |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | * |
460 | 460 | * @return false|float Excel date/time serial value |
461 | 461 | */ |
462 | - public static function stringToExcel(string $dateValue): bool|float |
|
462 | + public static function stringToExcel(string $dateValue): bool | float |
|
463 | 463 | { |
464 | 464 | if (strlen($dateValue) < 2) { |
465 | 465 | return false; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * Help some functions with large results operate correctly on 32-bit, |
9 | 9 | * by returning result as int when possible, float otherwise. |
10 | 10 | */ |
11 | - public static function evaluate(float|int $value): float|int |
|
11 | + public static function evaluate(float | int $value): float | int |
|
12 | 12 | { |
13 | 13 | $iValue = (int) $value; |
14 | 14 |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | return $this->yBestFitValues; |
297 | 297 | } |
298 | 298 | |
299 | - protected function calculateGoodnessOfFit(float $sumX, float $sumY, float $sumX2, float $sumY2, float $sumXY, float $meanX, float $meanY, bool|int $const): void |
|
299 | + protected function calculateGoodnessOfFit(float $sumX, float $sumY, float $sumX2, float $sumY2, float $sumXY, float $meanX, float $meanY, bool | int $const): void |
|
300 | 300 | { |
301 | 301 | $SSres = $SScov = $SStot = $SSsex = 0.0; |
302 | 302 | foreach ($this->xValues as $xKey => $xValue) { |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | { |
357 | 357 | return array_sum( |
358 | 358 | array_map( |
359 | - fn ($value): float|int => $value ** 2, |
|
359 | + fn ($value): float | int => $value ** 2, |
|
360 | 360 | $values |
361 | 361 | ) |
362 | 362 | ); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * |
34 | 34 | * @return float|string (string if result is an error) |
35 | 35 | */ |
36 | - public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|float |
|
36 | + public static function evaluate(array $database, array | null | int | string $field, array $criteria): string | float |
|
37 | 37 | { |
38 | 38 | $field = self::fieldExtract($database, $field); |
39 | 39 | if ($field === null) { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * the column label in which you specify a condition for the |
32 | 32 | * column. |
33 | 33 | */ |
34 | - public static function evaluate(array $database, array|null|int|string $field, array $criteria): float|string |
|
34 | + public static function evaluate(array $database, array | null | int | string $field, array $criteria): float | string |
|
35 | 35 | { |
36 | 36 | $field = self::fieldExtract($database, $field); |
37 | 37 | if ($field === null) { |