【问题标题】:Auto-populate variables, properties, and getters / setters in PhpStorm在 PhpStorm 中自动填充变量、属性和 getter/setter
【发布时间】:2017-06-02 05:45:02
【问题描述】:

我有一些需要使用大量参数构建的类(例如在某些情况下超过 50 个)。我正在使用 PhpStorm,并且能够快速构建如下属性列表:

 * @property string MainKey
 * @property string MainId
 * @property string Affiliation
 * @property string ParticipantYN

然后我可以使用 PhpStorm Generate getters / setters 创建 getter 和 setter —— 但由于类属性仍然不存在,我在 IDE 中收到 Field declared dynamically 警告。

有没有办法自动生成属性?例如

 public $MainKey;
 public $MainId;
 public $Affiliation;
 public $ParticipantYN;

【问题讨论】:

    标签: php autocomplete phpstorm phpstorm-2016.1


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-05
    • 2012-04-15
    • 2019-01-27
    • 1970-01-01
    • 2012-09-09
    • 2015-02-25
    相关资源
    最近更新 更多