mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
update(config/model command): add option to force usage of FQN + tests (#1031)
This commit is contained in:
@@ -1067,8 +1067,9 @@ class ModelsCommand extends Command
|
||||
$className = trim($className, '\\');
|
||||
$writingToExternalFile = !$this->write;
|
||||
$classIsNotInExternalFile = $reflection->getName() !== $className;
|
||||
$forceFQCN = $this->laravel['config']->get('ide-helper.force_fqn', false);
|
||||
|
||||
if ($writingToExternalFile && $classIsNotInExternalFile) {
|
||||
if (($writingToExternalFile && $classIsNotInExternalFile) || $forceFQCN) {
|
||||
return '\\' . $className;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user