(array $data)
| 217 | } |
| 218 | |
| 219 | private function removeNullColumns(array $data): array { |
| 220 | // Transpose the data to work with columns as rows |
| 221 | $transposedData = array_map(null, ...$data); |
| 222 | |
| 223 | // Filter out columns that contain only null values |
| 224 | $filteredData = array_filter($transposedData, function ($column) { |
| 225 | return !$this->containsOnlyNull($column); |
| 226 | }); |
| 227 | |
| 228 | // Transpose back to original row-column structure |
| 229 | return array_map(null, ...$filteredData); |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * @param $array |
no test coverage detected