mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f98cbbd86c | ||
|
|
4ca8db247f | ||
|
|
29f874381e |
+2
-1
@@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file.
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
Add support for multiple pivot types when using the same accessor.
|
- Add support for multiple pivot types when using the same accessor.
|
||||||
|
- Smarter reset, keep tags that IDE helper doesn't use
|
||||||
|
|
||||||
2024-10-18, 3.2.0
|
2024-10-18, 3.2.0
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -945,13 +945,19 @@ class ModelsCommand extends Command
|
|||||||
$reflection->getParentClass()->getInterfaceNames()
|
$reflection->getParentClass()->getInterfaceNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$phpdoc = new DocBlock($reflection, new Context($namespace));
|
||||||
if ($this->reset) {
|
if ($this->reset) {
|
||||||
$phpdoc = new DocBlock('', new Context($namespace));
|
|
||||||
$phpdoc->setText(
|
$phpdoc->setText(
|
||||||
(new DocBlock($reflection, new Context($namespace)))->getText()
|
(new DocBlock($reflection, new Context($namespace)))->getText()
|
||||||
);
|
);
|
||||||
} else {
|
foreach ($phpdoc->getTags() as $tag) {
|
||||||
$phpdoc = new DocBlock($reflection, new Context($namespace));
|
if (
|
||||||
|
in_array($tag->getName(), ['property', 'property-read', 'property-write', 'method', 'mixin'])
|
||||||
|
|| ($tag->getName() === 'noinspection' && in_array($tag->getContent(), ['PhpUnnecessaryFullyQualifiedNameInspection', 'PhpFullyQualifiedNameUsageInspection']))
|
||||||
|
) {
|
||||||
|
$phpdoc->deleteTag($tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$properties = [];
|
$properties = [];
|
||||||
|
|||||||
@@ -9,7 +9,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
|
* @noinspection PhpUnnecessaryFullyQualifiedNameInspection
|
||||||
* @property string $foo
|
* @property string $foo
|
||||||
|
* @property-read string $bar
|
||||||
|
* @method fooBar()
|
||||||
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Simple extends Model
|
class Simple extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,12 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
|
* @noinspection PhpUnnecessaryFullyQualifiedNameInspection
|
||||||
* @property string $foo
|
* @property string $foo
|
||||||
|
* @property-read string $bar
|
||||||
|
* @method fooBar()
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user