mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-22 12:03:08 +00:00
Use verbosity to hide some errors
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Barryvdh\LaravelIdeHelper\Console;
|
|||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A command to generate phpstorm meta data
|
* A command to generate phpstorm meta data
|
||||||
@@ -78,9 +79,11 @@ class MetaCommand extends Command {
|
|||||||
$bindings[$abstract] = get_class($concrete);
|
$bindings[$abstract] = get_class($concrete);
|
||||||
}
|
}
|
||||||
}catch (\Exception $e) {
|
}catch (\Exception $e) {
|
||||||
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
$this->comment("Cannot make '$abstract': ".$e->getMessage());
|
$this->comment("Cannot make '$abstract': ".$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$content = $this->view->make('ide-helper::meta', [
|
$content = $this->view->make('ide-helper::meta', [
|
||||||
'bindings' => $bindings,
|
'bindings' => $bindings,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Illuminate\Console\Command;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
||||||
use phpDocumentor\Reflection\DocBlock;
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
use phpDocumentor\Reflection\DocBlock\Context;
|
use phpDocumentor\Reflection\DocBlock\Context;
|
||||||
@@ -148,7 +149,9 @@ class ModelsCommand extends Command
|
|||||||
|
|
||||||
foreach ($models as $name) {
|
foreach ($models as $name) {
|
||||||
if (in_array($name, $ignore)) {
|
if (in_array($name, $ignore)) {
|
||||||
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
$this->comment("Ignoring model '$name'");
|
$this->comment("Ignoring model '$name'");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$this->properties = array();
|
$this->properties = array();
|
||||||
@@ -162,7 +165,9 @@ class ModelsCommand extends Command
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
$this->comment("Loading model '$name'");
|
$this->comment("Loading model '$name'");
|
||||||
|
}
|
||||||
|
|
||||||
if (!$reflectionClass->IsInstantiable()) {
|
if (!$reflectionClass->IsInstantiable()) {
|
||||||
throw new \Exception($name . ' is not instantiable.');
|
throw new \Exception($name . ' is not instantiable.');
|
||||||
|
|||||||
Reference in New Issue
Block a user