@@ -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, bool $returnError = true): null|float|string |
|
34 | + public static function evaluate(array $database, array | null | int | string $field, array $criteria, bool $returnError = true): null | float | string |
|
35 | 35 | { |
36 | 36 | $field = self::fieldExtract($database, $field); |
37 | 37 | if ($field === null) { |
@@ -1325,7 +1325,7 @@ discard block |
||
1325 | 1325 | $objWriter->endElement(); |
1326 | 1326 | } |
1327 | 1327 | |
1328 | - private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue): void |
|
1328 | + private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, RichText | string $cellValue): void |
|
1329 | 1329 | { |
1330 | 1330 | $objWriter->writeAttribute('t', $mappedType); |
1331 | 1331 | if (!$cellValue instanceof RichText) { |
@@ -1345,7 +1345,7 @@ discard block |
||
1345 | 1345 | /** |
1346 | 1346 | * @param string[] $flippedStringTable |
1347 | 1347 | */ |
1348 | - private function writeCellString(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue, array $flippedStringTable): void |
|
1348 | + private function writeCellString(XMLWriter $objWriter, string $mappedType, RichText | string $cellValue, array $flippedStringTable): void |
|
1349 | 1349 | { |
1350 | 1350 | $objWriter->writeAttribute('t', $mappedType); |
1351 | 1351 | if (!$cellValue instanceof RichText) { |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | } |
1356 | 1356 | } |
1357 | 1357 | |
1358 | - private function writeCellNumeric(XMLWriter $objWriter, float|int $cellValue): void |
|
1358 | + private function writeCellNumeric(XMLWriter $objWriter, float | int $cellValue): void |
|
1359 | 1359 | { |
1360 | 1360 | //force a decimal to be written if the type is float |
1361 | 1361 | if (is_float($cellValue)) { |
@@ -2116,7 +2116,7 @@ discard block |
||
2116 | 2116 | * @param float $scale_x The horizontal scale |
2117 | 2117 | * @param float $scale_y The vertical scale |
2118 | 2118 | */ |
2119 | - public function insertBitmap(int $row, int $col, GdImage|string $bitmap, int $x = 0, int $y = 0, float $scale_x = 1, float $scale_y = 1): void |
|
2119 | + public function insertBitmap(int $row, int $col, GdImage | string $bitmap, int $x = 0, int $y = 0, float $scale_x = 1, float $scale_y = 1): void |
|
2120 | 2120 | { |
2121 | 2121 | $bitmap_array = $bitmap instanceof GdImage |
2122 | 2122 | ? $this->processBitmapGd($bitmap) |
@@ -2258,7 +2258,7 @@ discard block |
||
2258 | 2258 | * @param int $rwB Row containing bottom right corner of object |
2259 | 2259 | * @param int $dyB Distance from bottom of cell |
2260 | 2260 | */ |
2261 | - private function writeObjPicture(int $colL, int $dxL, int $rwT, int|float $dyT, int $colR, int $dxR, int $rwB, int $dyB): void |
|
2261 | + private function writeObjPicture(int $colL, int $dxL, int $rwT, int | float $dyT, int $colR, int $dxR, int $rwB, int $dyB): void |
|
2262 | 2262 | { |
2263 | 2263 | $record = 0x005D; // Record identifier |
2264 | 2264 | $length = 0x003C; // Bytes to follow |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | } |
1298 | 1298 | } |
1299 | 1299 | |
1300 | - private function generateRowCellData(Worksheet $worksheet, null|Cell|string $cell, array|string &$cssClass): string |
|
1300 | + private function generateRowCellData(Worksheet $worksheet, null | Cell | string $cell, array | string &$cssClass): string |
|
1301 | 1301 | { |
1302 | 1302 | $cellData = ' '; |
1303 | 1303 | if ($cell instanceof Cell) { |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | string $cellData, |
1368 | 1368 | int $colSpan, |
1369 | 1369 | int $rowSpan, |
1370 | - array|string $cssClass, |
|
1370 | + array | string $cssClass, |
|
1371 | 1371 | int $colNum, |
1372 | 1372 | int $sheetIndex, |
1373 | 1373 | int $row |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * |
54 | 54 | * @return RichText|string Sanitized value |
55 | 55 | */ |
56 | - public static function checkString(null|RichText|string $textValue): RichText|string |
|
56 | + public static function checkString(null | RichText | string $textValue): RichText | string |
|
57 | 57 | { |
58 | 58 | if ($textValue instanceof RichText) { |
59 | 59 | // TODO: Sanitize Rich-Text string (max. character count is 32,767) |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1' |
84 | 84 | */ |
85 | - public static function absoluteReference(int|string $cellAddress): string |
|
85 | + public static function absoluteReference(int | string $cellAddress): string |
|
86 | 86 | { |
87 | 87 | $cellAddress = (string) $cellAddress; |
88 | 88 | if (self::coordinateIsRange($cellAddress)) { |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * |
407 | 407 | * @param int|numeric-string $columnIndex Column index (A = 1) |
408 | 408 | */ |
409 | - public static function stringFromColumnIndex(int|string $columnIndex): string |
|
409 | + public static function stringFromColumnIndex(int | string $columnIndex): string |
|
410 | 410 | { |
411 | 411 | static $indexCache = []; |
412 | 412 | static $lookupCache = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | /** |
264 | 264 | * retrieve ribbon XML Data. |
265 | 265 | */ |
266 | - public function getRibbonXMLData(string $what = 'all'): null|array|string //we need some constants here... |
|
266 | + public function getRibbonXMLData(string $what = 'all'): null | array | string //we need some constants here... |
|
267 | 267 | { |
268 | 268 | $returnData = null; |
269 | 269 | $what = strtolower($what); |
@@ -1082,7 +1082,7 @@ discard block |
||
1082 | 1082 | * |
1083 | 1083 | * @return false|Style |
1084 | 1084 | */ |
1085 | - public function getCellXfByHashCode(string $hashcode): bool|Style |
|
1085 | + public function getCellXfByHashCode(string $hashcode): bool | Style |
|
1086 | 1086 | { |
1087 | 1087 | foreach ($this->cellXfCollection as $cellXf) { |
1088 | 1088 | if ($cellXf->getHashCode() === $hashcode) { |
@@ -1185,7 +1185,7 @@ discard block |
||
1185 | 1185 | * |
1186 | 1186 | * @return false|Style |
1187 | 1187 | */ |
1188 | - public function getCellStyleXfByHashCode(string $hashcode): bool|Style |
|
1188 | + public function getCellStyleXfByHashCode(string $hashcode): bool | Style |
|
1189 | 1189 | { |
1190 | 1190 | foreach ($this->cellStyleXfCollection as $cellStyleXf) { |
1191 | 1191 | if ($cellStyleXf->getHashCode() === $hashcode) { |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * |
14 | 14 | * @return float|int Value in EMU |
15 | 15 | */ |
16 | - public static function pixelsToEMU(int $pixelValue): int|float |
|
16 | + public static function pixelsToEMU(int $pixelValue): int | float |
|
17 | 17 | { |
18 | 18 | return $pixelValue * 9525; |
19 | 19 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return float|int Value in cell dimension |
46 | 46 | */ |
47 | - public static function pixelsToCellDimension(int $pixelValue, \PhpOffice\PhpSpreadsheet\Style\Font $defaultFont): int|float |
|
47 | + public static function pixelsToCellDimension(int $pixelValue, \PhpOffice\PhpSpreadsheet\Style\Font $defaultFont): int | float |
|
48 | 48 | { |
49 | 49 | // Font name and size |
50 | 50 | $name = $defaultFont->getName(); |
@@ -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 |