src/Rocketeer/Services/Display/QueueExplainer.php
public function line($message, $color = null, $withTree = true)
    {
        $message = $this->toLines($message);
        if (!$this->hasCommand()) {
            return;
        }

        // Format the message
        $formatted = $message;
        foreach ($formatted as &$line) {
            $line = $this->colorize($line, $color);
            $line = $withTree ? $this->getTree().'|'.str_repeat(' ', $this->padding).$this->getFork().' '.$line : $line;
        }

        // Rejoin strings
        $formatted = implode(PHP_EOL, $formatted);
        $message = implode(PHP_EOL, $message);

        // Pass to command and log
        $this->command->writeln($formatted);
        $this->logs->log($message);

        return $formatted;
    }
public function line($message, $color = null, $withTree = true)
    {
        $message = $this->toLines($message);
        if (!$this->hasCommand()) {
            return;
        }

        // Format the message
        $formatted = $message;
        foreach ($formatted as &$line) {
            $line = $this->colorize($line, $color);
            $line = $withTree ? $this->getTree().'|'.str_repeat(' ', $this->padding).$this->getFork().' '.$line : $line;
        }

        // Rejoin strings
        $formatted = implode(PHP_EOL, $formatted);
        $message = implode(PHP_EOL, $message);

        // Pass to command and log
        $this->command->writeln($formatted);
        $this->logs->log($message);

        return $formatted;
    }
public function line ( $ message , $ color = null , $ withTree = true ) { $ message = $ this -> toLines ( $ message ) ; if ( ! $ this -> hasCommand ( ) ) { return ; } // Format the message $ formatted = $ message ; foreach ( $ formatted as & $ line ) { $ line = $ this -> colorize ( $ line , $ color ) ; $ line = $ withTree ? $ this -> getTree ( ) . '|' . str_repeat ( ' ' , $ this -> padding ) . $ this -> getFork ( ) . ' ' . $ line : $ line ; } // Rejoin strings $ formatted = implode ( PHP_EOL , $ formatted ) ; $ message = implode ( PHP_EOL , $ message ) ; // Pass to command and log $ this -> command -> writeln ( $ formatted ) ; $ this -> logs -> log ( $ message ) ; return $ formatted ; }
Format and send a message by the command.

@param string|string[] $message
@param string|null     $color
@param bool            $withTree

@return string|null
Format and send a message by the command .