From 961c060309b6aadecf786a77c8735ef50947dc0a Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sat, 22 Aug 2026 18:36:38 +0200 Subject: [PATCH] Clean up obsolete files --- bin/anagram-finder.php | 26 -------------------------- bin/tests.php | 16 ---------------- src/ArgHandler.php | 33 --------------------------------- src/Output.php | 12 ------------ 4 files changed, 87 deletions(-) delete mode 100644 bin/anagram-finder.php delete mode 100644 bin/tests.php delete mode 100644 src/ArgHandler.php delete mode 100644 src/Output.php diff --git a/bin/anagram-finder.php b/bin/anagram-finder.php deleted file mode 100644 index ccdfbae..0000000 --- a/bin/anagram-finder.php +++ /dev/null @@ -1,26 +0,0 @@ -get(1) ?: readline("Enter the anagram: "); -$minLength = $args->get(2) ?: 3; -$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) . ")")); - diff --git a/bin/tests.php b/bin/tests.php deleted file mode 100644 index 9a5333c..0000000 --- a/bin/tests.php +++ /dev/null @@ -1,16 +0,0 @@ -args = new Collection($argv); - } - - public static function make(array $argv): self - { - return new self($argv); - } - - public function get(int $index) - { - return $this->args - ->reject(fn ($word) => substr($word, 0, 2) === '--') - ->get($index); - } - - public function hasOption(string $option) { - return $this->args - ->filter(fn ($word) => $word === '--' . $option) - ->isNotEmpty(); - } -} diff --git a/src/Output.php b/src/Output.php deleted file mode 100644 index 376475e..0000000 --- a/src/Output.php +++ /dev/null @@ -1,12 +0,0 @@ -