You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PhpStorm格式化与phpcs(Zend代码风格)不一致问题咨询

配置PhpStorm使用Zend代码风格

我已经把PhpStorm成功配置为使用Zend代码风格啦,具体的配置路径和操作步骤如下:

  • 打开PhpStorm的偏好设置(Mac系统点击顶部菜单栏的PhpStorm > Preferences,Windows/Linux则是File > Settings)
  • 依次导航到路径:Editor > Code Style > PHP
  • 在PHP代码风格设置界面,点击Set from按钮,选择Zend就能完成配置

按照这个配置格式化后的代码示例如下:

<?php
return [
    'url_images' => '/img',
    'url_images_email' => 'http://website.mine.amazonaws.com/img/mail',
    'url_images_profile' => '//test.http://website.mine',
    'url_images_editorial_team' => '//http://website.mine/images/tips1',
    'url_images_profile_product' => '//http://website.mine/images/tips1',
    'url_ima...
];

内容的提问来源于stack exchange,提问作者Confidence

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:21:14