(array $data)
| 234 | } |
| 235 | |
| 236 | private function removeNullColumns(array $data): array { |
| 237 | // Transpose the data to work with columns as rows |
| 238 | $transposedData = array_map(null, ...$data); |
| 239 | |
| 240 | // Filter out columns that contain only null values |
| 241 | $filteredData = array_filter($transposedData, function ($column) { |
| 242 | return !$this->containsOnlyNull($column); |
| 243 | }); |
| 244 | |
| 245 | // Transpose back to original row-column structure |
| 246 | return array_map(null, ...$filteredData); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * @param $array |
no test coverage detected