zoukankan      html  css  js  c++  java
  • phpstorm 格式化代码

    MAC 安装phpcs、phpcbf

    composer global require 'squizlabs/php_codesniffer=*'
    
    Changed current directory to /Users/huangrong/.composer
    ./composer.json has been created
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
      - Installing squizlabs/php_codesniffer (3.3.0): Downloading (100%)
    Writing lock file
    Generating autoload files
    
    
    composer require friendsofphp/php-cs-fixer
    
    Using version ^2.12 for friendsofphp/php-cs-fixer
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 19 installs, 0 updates, 0 removals
      - Installing symfony/stopwatch (v4.1.1): Downloading (100%)
      - Installing symfony/process (v4.1.1): Downloading (100%)
      - Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)
      - Installing paragonie/random_compat (v2.0.17): Downloading (100%)
      - Installing symfony/polyfill-php70 (v1.8.0): Downloading (100%)
      - Installing symfony/options-resolver (v4.1.1): Downloading (100%)
      - Installing symfony/finder (v4.1.1): Downloading (100%)
      - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
      - Installing symfony/filesystem (v4.1.1): Downloading (100%)
      - Installing symfony/event-dispatcher (v4.1.1): Downloading (100%)
      - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
      - Installing symfony/console (v4.1.1): Downloading (100%)
      - Installing psr/log (1.0.2): Downloading (100%)
      - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)
      - Installing doctrine/lexer (v1.0.1): Downloading (100%)
      - Installing doctrine/annotations (v1.6.0): Downloading (100%)
      - Installing composer/xdebug-handler (1.1.0): Downloading (100%)
      - Installing composer/semver (1.4.2): Downloading (100%)
      - Installing friendsofphp/php-cs-fixer (v2.12.2): Downloading (100%)
    paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/event-dispatcher suggests installing symfony/http-kernel ()
    symfony/console suggests installing psr/log-implementation (For using the console logger)
    symfony/console suggests installing symfony/lock ()
    friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
    friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
    Writing lock file
    Generating autoload files
    
    

    文章参考

    https://blog.csdn.net/m0_38092942/article/details/80006144

    https://qq52o.me/2460.html
    http://www.zshanjun.com/discussions/24

  • 相关阅读:
    重温 JSP 与 Servlet
    Web/Java Web项目如何模块化?没有正文,别点
    Struts2 In Action笔记_页面到动作的数据流入和流出
    SQL小知识_长期总结
    Java代码工具箱_用Set给List/Vector去重
    Oracle小知识_长期总结
    样式缩写——css技巧(一)
    CSS中强大的EM
    人生苦短,我用python!
    15个超级实用的jQuery插件
  • 原文地址:https://www.cnblogs.com/itafter/p/9732156.html
Copyright © 2011-2022 走看看