承接 hellochef-me/php-styles 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hellochef-me/php-styles

最新稳定版本:1.0.9

Composer 安装命令:

composer require hellochef-me/php-styles

包简介

HelloChef shared PHP style rules for PHP-CS-Fixer

README 文档

README

HelloChef PHP Code Styles

Shared PHP style rules for PHP-CS-Fixer

Latest Version on Packagist Total Downloads MIT Licensed

Install the package

composer require hellochef-me/php-styles

Create and setup config file in project root .php-cs-fixer.php

<?php

return HelloChef\CodeStyles\PhpStyles::style();

Optionally, you may add php-cs-fixer cache file to your .gitignore

// .gitignore
.php-cs-fixer.cache

Format code on demand

  • Format the whole project
vendor/bin/php-cs-fixer fix .
  • Format specific file
vendor/bin/php-cs-fixer fix Path/To/ExampleFileToFormat.php

Format code on commit

Add the following scripts to your composer.json

"scripts": {
    "post-update-cmd": [
      "cp vendor/hellochef-me/php-styles/pre-commit .git/hooks/pre-commit",
      "chmod a+x .git/hooks/pre-commit"
    ],
    "post-install-cmd": [
      "cp vendor/hellochef-me/php-styles/pre-commit .git/hooks/pre-commit",
      "chmod a+x .git/hooks/pre-commit"
    ],
},

统计信息

  • 总下载量: 58.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-26