如何在PhpStorm上批量生成PHPDoc Facade Laravel
How to mass generate PHPDoc Facade Laravel on PhpStorm
我想在没有 ide_helper.php
的情况下在我的 Facade class 上批量生成 PHPDoc。如何生成它?
我试过 ide_helper.php
它可以自动完成。但就我而言,我想将 PHPDoc 写入我的 Facade class
然后在我的Facadeclass会自动写PHPDoc
由此
<?php
namespace AshAllenDesign\LaravelExchangeRates\Facades;
use Carbon\Carbon;
use Illuminate\Support\Facades\Facade;
class ExchangeRate extends Facade
{
protected static function getFacadeAccessor()
{
return 'exchange-rate';
}
}
对此
<?php
namespace AshAllenDesign\LaravelExchangeRates\Facades;
use Carbon\Carbon;
use Illuminate\Support\Facades\Facade;
/**
* @method static array currencies(array $currencies = [])
* @method static string|array exchangeRate(string $from, $to, ?Carbon $date = null)
* @method static array exchangeRateBetweenDateRange(string $from, $to, Carbon $date, Carbon $endDate, array $conversions = [])
* @method static float|array convert(int $value, string $from, $to, Carbon $date = null)
* @method static array convertBetweenDateRange(int $value, string $from, $to, Carbon $date, Carbon $endDate, array $conversions = [])
* @method static self shouldBustCache(bool $bustCache = true)
* @method static self shouldCache(bool $shouldCache = true)
*
* @see \AshAllenDesign\LaravelExchangeRates\Classes\ExchangeRate
*/
class ExchangeRate extends Facade
{
protected static function getFacadeAccessor()
{
return 'exchange-rate';
}
}
我制作了自己的工具来批量生成门面的 PHPDocs laravel,看看这个
https://gist.github.com/ardzz/473f8b994714370b917d6232ce5146f0
我想在没有 ide_helper.php
的情况下在我的 Facade class 上批量生成 PHPDoc。如何生成它?
我试过 ide_helper.php
它可以自动完成。但就我而言,我想将 PHPDoc 写入我的 Facade class
然后在我的Facadeclass会自动写PHPDoc
由此
<?php
namespace AshAllenDesign\LaravelExchangeRates\Facades;
use Carbon\Carbon;
use Illuminate\Support\Facades\Facade;
class ExchangeRate extends Facade
{
protected static function getFacadeAccessor()
{
return 'exchange-rate';
}
}
对此
<?php
namespace AshAllenDesign\LaravelExchangeRates\Facades;
use Carbon\Carbon;
use Illuminate\Support\Facades\Facade;
/**
* @method static array currencies(array $currencies = [])
* @method static string|array exchangeRate(string $from, $to, ?Carbon $date = null)
* @method static array exchangeRateBetweenDateRange(string $from, $to, Carbon $date, Carbon $endDate, array $conversions = [])
* @method static float|array convert(int $value, string $from, $to, Carbon $date = null)
* @method static array convertBetweenDateRange(int $value, string $from, $to, Carbon $date, Carbon $endDate, array $conversions = [])
* @method static self shouldBustCache(bool $bustCache = true)
* @method static self shouldCache(bool $shouldCache = true)
*
* @see \AshAllenDesign\LaravelExchangeRates\Classes\ExchangeRate
*/
class ExchangeRate extends Facade
{
protected static function getFacadeAccessor()
{
return 'exchange-rate';
}
}
我制作了自己的工具来批量生成门面的 PHPDocs laravel,看看这个 https://gist.github.com/ardzz/473f8b994714370b917d6232ce5146f0