get(1) ?: text("Enter the anagram", required: true); $minLength = $args->get(2) ?: text(label: "Enter the minimum length of the results. (default=3)", placeholder: 3, default: 3, required: true); $top10 = $args->hasOption('top'); Output::line(); Output::line("Results for your anagram: " . $anagram); $matches = Matcher::findWords($anagram, $minLength); if ($top10) { $matches = $matches->slice(0, 10); } $matches->each(fn(string $word) => Output::line($word . " (" . strlen($word) . ")"));