Use PSR-4

This commit is contained in:
Barry vd. Heuvel
2014-08-05 20:06:07 +02:00
parent 0d3e70299e
commit 3151019947
4 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -24,8 +24,8 @@
"doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)"
},
"autoload": {
"psr-0": {
"Barryvdh\\LaravelIdeHelper": "src/"
"psr-4": {
"Barryvdh\\LaravelIdeHelper\\": "src"
}
},
"extra": {
@@ -8,7 +8,7 @@
* @link https://github.com/barryvdh/laravel-ide-helper
*/
namespace Barryvdh\LaravelIdeHelper;
namespace Barryvdh\LaravelIdeHelper\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
@@ -8,7 +8,7 @@
* @link https://github.com/barryvdh/laravel-ide-helper
*/
namespace Barryvdh\LaravelIdeHelper;
namespace Barryvdh\LaravelIdeHelper\Console;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
@@ -11,6 +11,8 @@
namespace Barryvdh\LaravelIdeHelper;
use Illuminate\Support\ServiceProvider;
use Barryvdh\LaravelIdeHelper\Console\GeneratorCommand;
Use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
class IdeHelperServiceProvider extends ServiceProvider {
@@ -28,7 +30,7 @@ class IdeHelperServiceProvider extends ServiceProvider {
*/
public function boot()
{
$this->package('barryvdh/laravel-ide-helper');
$this->app['config']->package('barryvdh/laravel-ide-helper', __DIR__ . '/config');
}
/**
@@ -38,18 +40,17 @@ class IdeHelperServiceProvider extends ServiceProvider {
*/
public function register()
{
$this->app['command.ide-helper.generate'] = $this->app->share(function($app)
$this->app['command.ide-helper.generate'] = $this->app->share(function()
{
return new GeneratorCommand;
});
$this->commands('command.ide-helper.generate');
$this->app['command.ide-helper.models'] = $this->app->share(function($app)
$this->app['command.ide-helper.models'] = $this->app->share(function()
{
return new ModelsCommand();
});
$this->commands('command.ide-helper.models');
$this->commands('command.ide-helper.generate', 'command.ide-helper.models');
}
/**