fix namespacing

This commit is contained in:
myrmidex 2026-08-22 20:00:35 +02:00
parent 699279888a
commit bdf707c296
5 changed files with 10 additions and 25 deletions

View file

@ -3,8 +3,8 @@
require __DIR__ . '/../autoload.php'; require __DIR__ . '/../autoload.php';
use Lvl0\AnagramFinder\Core\Matcher; use Lvl0\AnagramFinder\Core\Matcher;
use Myrmidex\AnagramFinder\ArgHandler; use Lvl0\AnagramFinder\TUI\ArgHandler;
use Myrmidex\AnagramFinder\Output; use Lvl0\AnagramFinder\TUI\Output;
const DICTIONARY = __DIR__ . '/../assets/words.txt'; const DICTIONARY = __DIR__ . '/../assets/words.txt';

View file

@ -1,16 +0,0 @@
<?php
require __DIR__ . '/../autoload.php';
use Myrmidex\AnagramFinder\Matcher;
// are letters in word?
$anagram = "eamstexil";
$word = "steam";
assert(Matcher::check(anagram: $anagram, word: $word) === true);
$anagram = "eamstexil";
$word = "xxx";
assert(Matcher::check(anagram: $anagram, word: $word) === false);

View file

@ -9,8 +9,8 @@
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Myrmidex\\AnagramFinder\\": "src/", "Lvl0\\AnagramFinder\\TUI\\": "src/",
"Myrmidex\\AnagramFinder\\Tests\\": "tests/" "Lvl0\\AnagramFinder\\TUI\\Tests\\": "tests/"
} }
}, },
"authors": [ "authors": [

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Myrmidex\AnagramFinder; namespace Lvl0\AnagramFinder\TUI;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
@ -25,7 +25,8 @@ class ArgHandler
->get($index); ->get($index);
} }
public function hasOption(string $option) { public function hasOption(string $option)
{
return $this->args return $this->args
->filter(fn($word) => $word === '--' . $option) ->filter(fn($word) => $word === '--' . $option)
->isNotEmpty(); ->isNotEmpty();

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Myrmidex\AnagramFinder; namespace Lvl0\AnagramFinder\TUI;
class Output class Output
{ {