formatConditions example

$io->section($bus);

            $tableRows = [];
            foreach ($handlersByMessage as $message => $handlers) {
                if ($description = self::getClassDescription($message)) {
                    $tableRows[] = [sprintf('<comment>%s</>', $description)];
                }

                $tableRows[] = [sprintf('<fg=cyan>%s</fg=cyan>', $message)];
                foreach ($handlers as $handler) {
                    $tableRows[] = [
                        sprintf(' handled by <info>%s</>', $handler[0]).$this->formatConditions($handler[1]),
                    ];
                    if ($handlerDescription = self::getClassDescription($handler[0])) {
                        $tableRows[] = [sprintf(' <comment>%s</>', $handlerDescription)];
                    }
                }
                $tableRows[] = [''];
            }

            if ($tableRows) {
                $io->text('The following messages can be dispatched:');
                $io->newLine();
                
Home | Imprint | This part of the site doesn't use cookies.