CodeExplorer createTableOfContents example
$this->
write("\n\n"
);
$this->
describeInputDefinition($definition);
} } protected function describeApplication(Application
$application, array
$options =
[]): void
{ $description =
new ApplicationDescription($application,
$options['namespace'
] ?? null
);
$title =
$this->
getApplicationTitle($application);
$this->
write($title."\n".
str_repeat($this->partChar, Helper::
width($title)));
$this->
createTableOfContents($description,
$application);
$this->
describeCommands($application,
$options);
} private function getApplicationTitle(Application
$application): string
{ if ('UNKNOWN' ===
$application->
getName()) { return 'Console Tool';
} if ('UNKNOWN' !==
$application->
getVersion()) { return sprintf('%s %s',
$application->
getName(),
$application->
getVersion());
} $this->
write("\n\n"
);
$this->
describeInputDefinition($definition);
} } protected function describeApplication(Application
$application, array
$options =
[]): void
{ $description =
new ApplicationDescription($application,
$options['namespace'
] ?? null
);
$title =
$this->
getApplicationTitle($application);
$this->
write($title."\n".
str_repeat($this->partChar, Helper::
width($title)));
$this->
createTableOfContents($description,
$application);
$this->
describeCommands($application,
$options);
} private function getApplicationTitle(Application
$application): string
{ if ('UNKNOWN' ===
$application->
getName()) { return 'Console Tool';
} if ('UNKNOWN' !==
$application->
getVersion()) { return sprintf('%s %s',
$application->
getName(),
$application->
getVersion());
}