Exemple #1
0
 public static function printInCLI(array $array)
 {
     $output = null;
     $array = Arrays::padKeys($array);
     foreach ($array as $name => $descr) {
         $output .= PHP_EOL . ' ' . sprintf(_('%s: %s'), $name, $descr);
     }
     reset($array);
     $nb_nl_space = mb_strlen(key($array)) + 3;
     $nb_nl_space += mb_substr_count(' ' . _('%s: %s'), ' ');
     return String::wrap80($output, str_repeat(' ', $nb_nl_space));
 }