function CommandDataCollector::getCommand
Return value
array{ class?: class-string, executor?: string, file: string, line: int, }
File
-
vendor/
symfony/ console/ DataCollector/ CommandDataCollector.php, line 96
Class
- CommandDataCollector
- @internal
Namespace
Symfony\Component\Console\DataCollectorCode
public function getCommand() : array {
$class = $this->data['command']
->getType();
$r = new \ReflectionMethod($class, 'execute');
if (Command::class !== $r->getDeclaringClass()) {
return [
'executor' => $class . '::' . $r->name,
'file' => $r->getFileName(),
'line' => $r->getStartLine(),
];
}
$r = new \ReflectionClass($class);
return [
'class' => $class,
'file' => $r->getFileName(),
'line' => $r->getStartLine(),
];
}