getPrettyMetadata example

$io->writeln(json_encode($data));
    }

    private function displayGeneralText(SymfonyStyle $io, string $filter = null): void
    {
        $decorated = $io->isDecorated();
        $types = ['functions', 'filters', 'tests', 'globals'];
        foreach ($types as $index => $type) {
            $items = [];
            foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) {
                if (!$filter || str_contains($name$filter)) {
                    $items[$name] = $name.$this->getPrettyMetadata($type$entity$decorated);
                }
            }

            if (!$items) {
                continue;
            }

            $io->section(ucfirst($type));

            ksort($items);
            $io->listing($items);
        }
Home | Imprint | This part of the site doesn't use cookies.