mikedeveloper/october-ide-helper
October IDE Helper,为所有 Facade 类生成正确的 PHPDocs,以改善自动补全。
v1.0.3
2021-04-07 13:00 UTC
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- barryvdh/reflection-docblock: ^2.0.6
- composer/composer: ^1.6 || ^2
- doctrine/dbal: ^2.6 || ^3
- illuminate/console: ^6
- illuminate/filesystem: ^6
- illuminate/support: ^6
- nikic/php-parser: ^4.7
- phpdocumentor/type-resolver: ^1.1.0
Requires (Dev)
- ext-pdo_sqlite: *
- friendsofphp/php-cs-fixer: ^2
- illuminate/config: ^6
- illuminate/view: ^6
- phpunit/phpunit: ^8.5 || ^9
This package is auto-updated.
Last update: 2024-09-07 21:03:00 UTC
README
完整的 PHPDocs,直接从源代码生成
本包生成辅助文件,使您的 IDE 能够提供准确的自动补全。生成基于您的项目文件,因此它们始终保持最新。
安装
使用以下命令通过 composer 安装此包:
composer require --dev mikedevs/october-ide-helper
将以下类添加到 config/app.php 文件中的 providers 数组:
Mikedevs\OctoberIdeHelper\IdeHelperServiceProvider::class,
注意:避免在开发环境中缓存配置,安装此包后可能会导致问题;如果运行命令时遇到问题,请先通过
php artisan cache:clear清除缓存
用法
您可以自己重新生成文档(用于未来的更新)
php artisan mikedevs:october-ide-helper:models --dir="path/to/plugin/models"
/**
- @property integer $id
- @property integer $author_id
- @property string $title
- @property string $text
- @property \Illuminate\Support\Carbon $created_at
- @property \Illuminate\Support\Carbon $updated_at
- @property-read \User $author
- @property-read \Illuminate\Database\Eloquent\Collection|\Comment[] $comments
- @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Post newModelQuery()
- @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Post newQuery()
- @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Post query()
- @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Post whereTitle($value)
- … */