Compare commits

...
4 Commits
Author SHA1 Message Date
Django Eijgensteijn a7fc2ec489 Sorting model docs (#424) 2017-01-05 22:20:42 +01:00
Barry vd. Heuvel 8caca941b3 Update IdeHelperServiceProvider.php 2017-01-05 10:02:31 +01:00
Barry vd. Heuvel e96943fe6f Use singleton instead of share 2017-01-05 09:58:45 +01:00
Barry vd. Heuvel df3ecb2843 Update composer.json 2016-12-09 12:13:18 +01:00
3 changed files with 12 additions and 6 deletions
+3 -3
View File
@@ -11,9 +11,9 @@
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "^5.0,<5.4",
"illuminate/console": "^5.0,<5.4",
"illuminate/filesystem": "^5.0,<5.4",
"illuminate/support": "^5.0,<5.5",
"illuminate/console": "^5.0,<5.5",
"illuminate/filesystem": "^5.0,<5.5",
"barryvdh/reflection-docblock": "^2.0.4",
"symfony/class-loader": "^2.3|^3.0"
},
+3
View File
@@ -377,6 +377,7 @@ class ModelsCommand extends Command
{
$methods = get_class_methods($model);
if ($methods) {
sort($methods);
foreach ($methods as $method) {
if (Str::startsWith($method, 'get') && Str::endsWith(
$method,
@@ -569,6 +570,8 @@ class ModelsCommand extends Command
$phpdoc->appendTag($tag);
}
ksort($this->methods);
foreach ($this->methods as $name => $method) {
if (in_array($name, $methods)) {
continue;
+6 -3
View File
@@ -54,19 +54,22 @@ class IdeHelperServiceProvider extends ServiceProvider
$configPath = __DIR__ . '/../config/ide-helper.php';
$this->mergeConfigFrom($configPath, 'ide-helper');
$this->app['command.ide-helper.generate'] = $this->app->share(
$this->app->singleton(
'command.ide-helper.generate',
function ($app) {
return new GeneratorCommand($app['config'], $app['files'], $app['view']);
}
);
$this->app['command.ide-helper.models'] = $this->app->share(
$this->app->singleton(
'command.ide-helper.models',
function ($app) {
return new ModelsCommand($app['files']);
}
);
$this->app['command.ide-helper.meta'] = $this->app->share(
$this->app->singleton(
'command.ide-helper.meta',
function ($app) {
return new MetaCommand($app['files'], $app['view']);
}