public function onConsoleCommand(ConsoleCommandEvent $event): void
    {
        $command = $event->getCommand();

        Hub::getCurrent()
            ->configureScope(function (Scope $scope) use ($command): void {
                $scope->setTag('command', $command ? $command->getName() : 'N/A');
            });
    }
public function onConsoleCommand(ConsoleCommandEvent $event): void
    {
        $command = $event->getCommand();

        Hub::getCurrent()
            ->configureScope(function (Scope $scope) use ($command): void {
                $scope->setTag('command', $command ? $command->getName() : 'N/A');
            });
    }
public function onConsoleCommand ( ConsoleCommandEvent $ event ) : void { $ command = $ event -> getCommand ( ) ; Hub :: getCurrent ( ) -> configureScope ( function ( Scope $ scope ) use ( $ command ) : void { $ scope -> setTag ( 'command' , $ command ? $ command -> getName ( ) : 'N/A' ) ; } ) ; }
This method ensures that the client and error handlers are registered at the start of the command
execution cycle, and not only on exceptions

@param ConsoleCommandEvent $event

@return void
This method ensures that the client and error handlers are registered at the start of the command execution cycle and not only on exceptions