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

  • 相关阅读:
    数据结构与算法
    android vitamio的坑
    Fragment的坑
    scrollview里面嵌套listview的坑
    关于微信小程序的tabbar
    Intent初级学习
    HDU 4562 守护雅典娜
    SGU 542 Gena vs Petya
    [二] EditText and Button
    A Data Structure for Dynamic Trees
  • 原文地址:https://www.cnblogs.com/itafter/p/9732156.html
Copyright © 2011-2022 走看看