PDepend\TextUI\Command::printOption PHP Method

printOption() private method

Prints a single option.
private printOption ( string $option, string $message, integer $length ) : void
$option string The option identifier.
$message string The option help message.
$length integer The length of the longest option.
return void
    private function printOption($option, $message, $length)
    {
        // Ignore the phpunit xml option
        if (0 === strpos($option, '--phpunit-xml=')) {
            return;
        }
        // Calculate the max message length
        $mlength = 77 - $length;
        $option = str_pad($option, $length, ' ', STR_PAD_RIGHT);
        echo '  ', $option, ' ';
        $lines = explode(PHP_EOL, wordwrap($message, $mlength, PHP_EOL));
        echo array_shift($lines);
        while (($line = array_shift($lines)) !== null) {
            echo PHP_EOL, str_repeat(' ', $length + 3), $line;
        }
        echo PHP_EOL;
    }