classes/phing/Phing.php
private function _printTargets($names, $descriptions, $heading, $maxlen)
    {
        $spaces = '  ';
        while (strlen($spaces) < $maxlen) {
            $spaces .= $spaces;
        }
        $msg = "";
        $msg .= $heading . PHP_EOL;
        $msg .= str_repeat("-", 79) . PHP_EOL;

        $total = count($names);
        for ($i = 0; $i < $total; $i++) {
            $msg .= " ";
            $msg .= $names[$i];
            if (!empty($descriptions)) {
                $msg .= substr($spaces, 0, $maxlen - strlen($names[$i]) + 2);
                $msg .= $descriptions[$i];
            }
            $msg .= PHP_EOL;
        }
        if ($total > 0) {
            self::$out->write($msg . PHP_EOL);
        }
    }
private function _printTargets($names, $descriptions, $heading, $maxlen)
    {
        $spaces = '  ';
        while (strlen($spaces) < $maxlen) {
            $spaces .= $spaces;
        }
        $msg = "";
        $msg .= $heading . PHP_EOL;
        $msg .= str_repeat("-", 79) . PHP_EOL;

        $total = count($names);
        for ($i = 0; $i < $total; $i++) {
            $msg .= " ";
            $msg .= $names[$i];
            if (!empty($descriptions)) {
                $msg .= substr($spaces, 0, $maxlen - strlen($names[$i]) + 2);
                $msg .= $descriptions[$i];
            }
            $msg .= PHP_EOL;
        }
        if ($total > 0) {
            self::$out->write($msg . PHP_EOL);
        }
    }
private function _printTargets ( $ names , $ descriptions , $ heading , $ maxlen ) { $ spaces = '  ' ; while ( strlen ( $ spaces ) < $ maxlen ) { $ spaces .= $ spaces ; } $ msg = "" ; $ msg .= $ heading . PHP_EOL ; $ msg .= str_repeat ( "-" , 79 ) . PHP_EOL ; $ total = count ( $ names ) ; for ( $ i = 0 ; $ i < $ total ; $ i ++ ) { $ msg .= " " ; $ msg .= $ names [ $ i ] ; if ( ! empty ( $ descriptions ) ) { $ msg .= substr ( $ spaces , 0 , $ maxlen - strlen ( $ names [ $ i ] ) + 2 ) ; $ msg .= $ descriptions [ $ i ] ; } $ msg .= PHP_EOL ; } if ( $ total > 0 ) { self :: $ out -> write ( $ msg . PHP_EOL ) ; } }
Writes a formatted list of target names with an optional description.

@param array $names The names to be printed.
Must not be <code>null</code>.
@param array $descriptions The associated target descriptions.
May be <code>null</code>, in which case
no descriptions are displayed.
If non-<code>null</code>, this should have
as many elements as <code>names</code>.
@param string $heading The heading to display.
Should not be <code>null</code>.
@param int $maxlen The maximum length of the names of the targets.
If descriptions are given, they are padded to this
position so they line up (so long as the names really
<i>are</i> shorter than this).
Writes a formatted list of target names with an optional description .