Skip to content

Commit

Permalink
Keep phpstan happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Oct 14, 2024
1 parent dca0282 commit cb8c93b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/Commands/Concerns/QualifiesDomainModels.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,8 @@

namespace Lunarstorm\LaravelDDD\Commands\Concerns;

use Illuminate\Support\Str;

trait QualifiesDomainModels
{
protected function qualifyClass($name)
{
$name = ltrim($name, '\\/');

$name = str_replace('/', '\\', $name);

$rootNamespace = $this->rootNamespace();

if (Str::startsWith($name, $rootNamespace)) {
return $name;
}

// return $this->qualifyClass(
// $this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name
// );
return $this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name;
}

protected function qualifyModel(string $model)
{
if ($domain = $this->domain) {
Expand Down
15 changes: 15 additions & 0 deletions src/Commands/Migration/BaseMigrateMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ protected function getNameInput()

return $name;
}

protected function qualifyModel(string $model)
{
return;
}

protected function getDefaultNamespace($rootNamespace)
{
return;
}

protected function getPath($name)
{
return;
}
}

0 comments on commit cb8c93b

Please sign in to comment.