doulu1325 2018-02-21 14:21
浏览 362
已采纳

在IntelliJ / PhpStorm中搜索所有文件以查找特定错误类型

We recently upgraded on of our projects to PHP7, which doesn't allow the following:

class SomeTestClass {

  /**
   * This is the constructor
   */
  public function SomeTestClass (){
    //Whatever
  }
}

The constructor should be renamed to __construct instead of the class-name. PhpStorm correctly indicates this as "Old style constructor usage". Can I search all files of my project for this specific error type?

  • 写回答

2条回答 默认 最新

  • dongyinzhi4689 2018-02-21 14:27
    关注

    There's an inspection for this: PHP → Code Style → Old style constructor. You can then use the menu Code → Inspect code to find them all.

    Code inspections

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 将两文件中相同行数行 打印至同一行
  • ¥15 关于#单片机#的问题:c51单片机想做个密码重置按键K13不知道如何去做,用了24c02来存储
  • ¥20 有没有会python的帮帮我😥
  • ¥15 如何修改系统里的设备信息及某某镇某某村如图所示
  • ¥15 变数的长度不一样”。是什么原因呢?如何修改?
  • ¥15 matlab作业不会写
  • ¥15 eclipse mqtt 消息消费问题
  • ¥15 vue2(标签-chrome|关键词-浏览器兼容)
  • ¥15 python网络流自动生成系统 医学领域
  • ¥15 sql查询仓库里都有什么