← All changes
|
libraries/vendor/PhpSpreadsheet/Calculation/LookupRef/Matrix.php
+3
-3
3.3.1
→
3.4
View file →
| @@ -124,9 +124,9 @@ | ||
| 124 | 124 | return ExcelError::REF(); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | $rowKeys = array_keys($matrix); |
| 128 | - $columnKeys = @array_keys($matrix[$rowKeys[0]]); //* @phpstan-ignore-line | |
| 128 | + $columnKeys = @array_keys($matrix[$rowKeys[0]]); //* @phpstan-ignore argument.type (argument 1 of array_keys may be mixed not array) | |
| 129 | 129 | |
| 130 | 130 | if ($columnNum > count($columnKeys)) { |
| 131 | 131 | return ExcelError::REF(); |
| 132 | 132 | } |
| @@ -134,9 +134,9 @@ | ||
| 134 | 134 | if ($columnNum === 0) { |
| 135 | 135 | return self::extractRowValue($matrix, $rowKeys, $rowNum); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $columnNum = $columnKeys[--$columnNum]; //* @phpstan-ignore-line | |
| 138 | + $columnNum = $columnKeys[--$columnNum]; //* @phpstan-ignore offsetAccess.notFound (perhaps index --$columnNum does not exist) | |
| 139 | 139 | if ($rowNum === 0) { |
| 140 | 140 | return array_map( |
| 141 | 141 | fn ($value): array => [$value], |
| 142 | 142 | array_column($matrix, $columnNum) |
| @@ -141,9 +141,9 @@ | ||
| 141 | 141 | fn ($value): array => [$value], |
| 142 | 142 | array_column($matrix, $columnNum) |
| 143 | 143 | ); |
| 144 | 144 | } |
| 145 | - $rowNum = $rowKeys[--$rowNum]; //* @phpstan-ignore-line | |
| 145 | + $rowNum = $rowKeys[--$rowNum]; //* @phpstan-ignore offsetAccess.notFound (perhaps index --$rowNum does not exist) | |
| 146 | 146 | /** @var mixed[][] $matrix */ |
| 147 | 147 | |
| 148 | 148 | return $matrix[$rowNum][$columnNum]; |
| 149 | 149 | } |