fix namespacing
This commit is contained in:
parent
699279888a
commit
bdf707c296
5 changed files with 10 additions and 25 deletions
|
|
@ -3,8 +3,8 @@
|
|||
require __DIR__ . '/../autoload.php';
|
||||
|
||||
use Lvl0\AnagramFinder\Core\Matcher;
|
||||
use Myrmidex\AnagramFinder\ArgHandler;
|
||||
use Myrmidex\AnagramFinder\Output;
|
||||
use Lvl0\AnagramFinder\TUI\ArgHandler;
|
||||
use Lvl0\AnagramFinder\TUI\Output;
|
||||
|
||||
const DICTIONARY = __DIR__ . '/../assets/words.txt';
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
"license": "AGPL-3.0-only",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Myrmidex\\AnagramFinder\\": "src/",
|
||||
"Myrmidex\\AnagramFinder\\Tests\\": "tests/"
|
||||
"Lvl0\\AnagramFinder\\TUI\\": "src/",
|
||||
"Lvl0\\AnagramFinder\\TUI\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Myrmidex\AnagramFinder;
|
||||
namespace Lvl0\AnagramFinder\TUI;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ class ArgHandler
|
|||
->get($index);
|
||||
}
|
||||
|
||||
public function hasOption(string $option) {
|
||||
public function hasOption(string $option)
|
||||
{
|
||||
return $this->args
|
||||
->filter(fn($word) => $word === '--' . $option)
|
||||
->isNotEmpty();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Myrmidex\AnagramFinder;
|
||||
namespace Lvl0\AnagramFinder\TUI;
|
||||
|
||||
class Output
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue