Skip to content

Commit

Permalink
Fixes #6. Also did some minor clean-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Niellles committed Apr 20, 2021
1 parent 48ec963 commit 93c7755
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
}
],
"require": {
"laravel/lumen-framework": ">=5.1"
"laravel/lumen-framework": ">=5.1",
"ext-json": "*"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 7 additions & 5 deletions src/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

namespace Niellles\LumenCommands;

use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputArgument;

require_once('helpers.php');
require_once 'helpers.php';


abstract class GeneratorCommand extends Command
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
* @var Filesystem
*/
protected $files;

Expand All @@ -31,7 +32,7 @@ abstract class GeneratorCommand extends Command
/**
* Create a new controller creator command instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param Filesystem $files
* @return void
*/
public function __construct(Filesystem $files)
Expand Down Expand Up @@ -146,8 +147,9 @@ protected function makeDirectory($path)
/**
* Build the class with the given name.
*
* @param string $name
* @param string $name
* @return string
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
protected function buildClass($name)
{
Expand Down Expand Up @@ -203,7 +205,7 @@ public function getLumenNamespace()
}
}

throw new RuntimeException('Unable to detect application namespace.');
throw new Exception('Unable to detect application namespace.');
}

/**
Expand Down

0 comments on commit 93c7755

Please sign in to comment.