Skip to content

Commit

Permalink
Merge pull request #224 from galo4kin/master
Browse files Browse the repository at this point in the history
Remove deleted DetectsApplicationNamespace
  • Loading branch information
franzose authored Mar 31, 2020
2 parents bdd4b3b + 2caaca6 commit 831d8bb
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Franzose/ClosureTable/Console/MakeCommand.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php

namespace Franzose\ClosureTable\Console;

use Illuminate\Console\DetectsApplicationNamespace;
use Franzose\ClosureTable\Extensions\Str as ExtStr;
use Franzose\ClosureTable\Generators\Migration;
use Franzose\ClosureTable\Generators\Model;
use Illuminate\Console\Command;
use Illuminate\Container\Container;
use Illuminate\Support\Composer;
use Symfony\Component\Console\Input\InputOption;
use Franzose\ClosureTable\Generators\Migration;
use Franzose\ClosureTable\Generators\Model;
use Franzose\ClosureTable\Extensions\Str as ExtStr;

/**
* ClosureTable scaffolding command, created migrations and models.
Expand All @@ -16,8 +17,6 @@
*/
class MakeCommand extends Command
{
use DetectsApplicationNamespace;

/**
* The console command name.
*
Expand Down Expand Up @@ -152,7 +151,7 @@ protected function prepareOptions()

$lastnsdelim = strrpos($input[1], '\\');

$this->options[$options[0][0]] = $input[0] ?: rtrim($this->getAppNamespace(), '\\');
$this->options[$options[0][0]] = $input[0] ?: rtrim(Container::getInstance()->getNamespace(), '\\');
$this->options[$options[1][0]] = substr($input[1], $lastnsdelim);
$this->options[$options[2][0]] = $input[2] ?: ExtStr::tableize($input[1]);
$this->options[$options[3][0]] = $input[3] ?: $this->options[$options[1][0]] . 'Closure';
Expand Down

0 comments on commit 831d8bb

Please sign in to comment.