<commit_before><?php

// An example of a commands template

echo PHP_EOL . 'Available commands:' . PHP_EOL;

/** @var \GetOpt\Command[] $commands */

$data      = [];
$nameWidth = 0;
foreach ($commands as $command) {
    if (strlen($command->name()) > $nameWidth) {
        $nameWidth = strlen($command->name());
    }

    $data[] = [
        $command->name(),
        $command->description(true)
    ];
}

echo $this->renderColumns($nameWidth, $data);<commit_msg>use non deprecated getters in template examples<commit_after><?php

// An example of a commands template

echo PHP_EOL . 'Available commands:' . PHP_EOL;

/** @var \GetOpt\Command[] $commands */

$data      = [];
$nameWidth = 0;
foreach ($commands as $command) {
    if (strlen($command->getName()) > $nameWidth) {
        $nameWidth = strlen($command->getName());
    }

    $data[] = [
        $command->getName(),
        $command->getShortDescription()
    ];
}

echo $this->renderColumns($nameWidth, $data);
{'fraction_non_alphanumeric': 0.18014329580348004, 'fraction_numerical': 0.0020470829068577278, 'mean_word_length': 3.1974248927038627, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '338621', 'n_tokens_mistral': 307, 'n_tokens_neox': 305, 'n_words': 71}