mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1ebd847aa | ||
|
|
83597196f9 |
@@ -334,7 +334,7 @@ class ModelsCommand extends Command
|
|||||||
array_shift($args);
|
array_shift($args);
|
||||||
$this->setMethod($name, '\Illuminate\Database\Query\Builder|\\' . $reflection->class, $args);
|
$this->setMethod($name, '\Illuminate\Database\Query\Builder|\\' . $reflection->class, $args);
|
||||||
}
|
}
|
||||||
} elseif (!method_exists('Eloquent', $method) && !Str::startsWith($method, 'get')) {
|
} elseif (!method_exists('Illuminate\Database\Eloquent\Model', $method) && !Str::startsWith($method, 'get')) {
|
||||||
|
|
||||||
//Use reflection to inspect the code, based on Illuminate/Support/SerializableClosure.php
|
//Use reflection to inspect the code, based on Illuminate/Support/SerializableClosure.php
|
||||||
$reflection = new \ReflectionMethod($model, $method);
|
$reflection = new \ReflectionMethod($model, $method);
|
||||||
@@ -490,7 +490,7 @@ class ModelsCommand extends Command
|
|||||||
$phpdoc->appendTag($tag);
|
$phpdoc->appendTag($tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->write) {
|
if ($this->write && ! $phpdoc->getTagsByName('mixin')) {
|
||||||
$phpdoc->appendTag(Tag::createInstance("@mixin \\Eloquent", $phpdoc));
|
$phpdoc->appendTag(Tag::createInstance("@mixin \\Eloquent", $phpdoc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user