Repository: symfony/symfony
File: src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php (PHP)

Code before:
            $shouldShowHost = $shouldShowHost || 'ANY' !== $host;

            $row = [
                'Name' => $name,
                'Methods' => $this->formatMethods($route->getMethods()),
                'Schema' => $schema,
                'Host' => $host,
                'Path' => $route->getPath(),
                'Controller' => $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : '',
            ];

            if ($showAliases) {
                $row['Aliases'] = implode('|', ($this->getReverseAliases($routes))[$name] ?? []);
            }

            $tableRows[] = $row;
        }

        $tableHeaders = ['Name', 'Method'];

        if ($shouldShowSchema) {
            $tableHeaders[] = 'Schema';
        } else {
            array_walk($tableRows, function (&$row) {
                unset($row['Schema']);
            });
        }

        if ($shouldShowHost) {
            $tableHeaders[] = 'Host';
        } else {
            array_walk($tableRows, function (&$row) {
                unset($row['Host']);
            });
        }

        $tableHeaders = array_merge($tableHeaders, ['Path', 'Controller']);

        if ($showAliases) {
            $tableHeaders[] = 'Aliases';
        }

        if (isset($options['output'])) {
            $options['output']->table($tableHeaders, $tableRows);
        } else {
            $table = new Table($this->getOutput());
            $table->setHeaders($tableHeaders)->setRows($tableRows);
            $table->render();
        }
    }


Review comment (suggestion):
```suggestion
            array_walk($tableRows, function (&$row) { row['Scheme']); });
```

Code after:

            $host = '' !== $route->getHost() ? $route->getHost() : 'ANY';
            $shouldShowHost = $shouldShowHost || 'ANY' !== $host;

            $row = [
                'Name' => $name,
                'Methods' => $this->formatMethods($route->getMethods()),
                'Scheme' => $scheme,
                'Host' => $host,
                'Path' => $route->getPath(),
            ];

            if ($showControllers) {
                $row['Controller'] = $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : '';
            }

            if ($showAliases) {
                $row['Aliases'] = implode('|', $this->getReverseAliases($routes)[$name] ?? []);
            }

            $tableRows[] = $row;
        }

        $tableHeaders = ['Name', 'Method'];

        if ($shouldShowScheme) {
            $tableHeaders[] = 'Scheme';
        } else {
            array_walk($tableRows, function (&$row) { unset($row['Scheme']); });
        }

        if ($shouldShowHost) {
            $tableHeaders[] = 'Host';
        } else {
            array_walk($tableRows, function (&$row) { unset($row['Host']); });
        }

        $tableHeaders[] = 'Path';

        if ($showControllers) {
            $tableHeaders[] = 'Controller';
        }

        if ($showAliases) {
            $tableHeaders[] = 'Aliases';
        }

        if (isset($options['output'])) {
            $options['output']->table($tableHeaders, $tableRows);
        } else {
            $table = new Table($this->getOutput());