mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Tweak abstracts
This commit is contained in:
@@ -66,11 +66,8 @@ class MetaCommand extends Command {
|
||||
*/
|
||||
public function fire()
|
||||
{
|
||||
$filename = $this->option('filename');
|
||||
|
||||
$bindings = array();
|
||||
|
||||
foreach ($this->laravel->getBindings() as $abstract => $options) {
|
||||
foreach ($this->getAbstracts() as $abstract) {
|
||||
try {
|
||||
$concrete = $this->laravel->make($abstract);
|
||||
if (is_object($concrete)) {
|
||||
@@ -86,6 +83,7 @@ class MetaCommand extends Command {
|
||||
'methods' => $this->methods,
|
||||
))->render();
|
||||
|
||||
$filename = $this->option('filename');
|
||||
$written = $this->files->put($filename, $content);
|
||||
|
||||
if ($written !== false) {
|
||||
@@ -94,6 +92,16 @@ class MetaCommand extends Command {
|
||||
$this->error("The meta file could not be created at $filename");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of abstracts from the Laravel Application.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getAbstracts()
|
||||
{
|
||||
return array_keys($this->laravel->getBindings());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the console command options.
|
||||
|
||||
Reference in New Issue
Block a user