Skip to content

Commit

Permalink
Update DebugCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacePossum committed Mar 31, 2019
1 parent cf62089 commit 80818ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Symfony/Bridge/Twig/Command/DebugCommand.php
Expand Up @@ -101,7 +101,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$decored = $io->isDecorated();
$decorated = $io->isDecorated();

// BC to be removed in 4.0
if (__CLASS__ !== \get_class($this)) {
Expand Down Expand Up @@ -135,7 +135,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$data['loader_paths'] = $this->getLoaderPaths();
$data = json_encode($data, JSON_PRETTY_PRINT);
$io->writeln($decored ? OutputFormatter::escape($data) : $data);
$io->writeln($decorated ? OutputFormatter::escape($data) : $data);

return 0;
}
Expand All @@ -144,7 +144,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$items = [];
foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) {
if (!$filter || false !== strpos($name, $filter)) {
$items[$name] = $name.$this->getPrettyMetadata($type, $entity, $decored);
$items[$name] = $name.$this->getPrettyMetadata($type, $entity, $decorated);
}
}

Expand Down Expand Up @@ -270,7 +270,7 @@ private function getMetadata($type, $entity)
}
}

private function getPrettyMetadata($type, $entity, $decored)
private function getPrettyMetadata($type, $entity, $decorated)
{
if ('tests' === $type) {
return '';
Expand All @@ -282,7 +282,7 @@ private function getPrettyMetadata($type, $entity, $decored)
return '(unknown?)';
}
} catch (\UnexpectedValueException $e) {
return sprintf(' <error>%s</error>', $decored ? OutputFormatter::escape($e->getMessage()) : $e->getMessage());
return sprintf(' <error>%s</error>', $decorated ? OutputFormatter::escape($e->getMessage()) : $e->getMessage());
}

if ('globals' === $type) {
Expand All @@ -292,7 +292,7 @@ private function getPrettyMetadata($type, $entity, $decored)

$description = substr(@json_encode($meta), 0, 50);

return sprintf(' = %s', $decored ? OutputFormatter::escape($description) : $description);
return sprintf(' = %s', $decorated ? OutputFormatter::escape($description) : $description);
}

if ('functions' === $type) {
Expand Down

0 comments on commit 80818ef

Please sign in to comment.