(array $data)
| 207 | } |
| 208 | |
| 209 | private function removeNullColumns(array $data): array { |
| 210 | // Transpose the data to work with columns as rows |
| 211 | $transposedData = array_map(null, ...$data); |
| 212 | |
| 213 | // Filter out columns that contain only null values |
| 214 | $filteredData = array_filter($transposedData, function ($column) { |
| 215 | return !$this->containsOnlyNull($column); |
| 216 | }); |
| 217 | |
| 218 | // Transpose back to original row-column structure |
| 219 | return array_map(null, ...$filteredData); |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * @param $array |
no test coverage detected