classy-org/php-classy-standards

一个根据Classy编码标准自动检查和修复PHP文件的工具

1.1.0 2020-11-12 19:12 UTC

This package is auto-updated.

Last update: 2024-09-13 03:49:29 UTC


README

composer require --dev classy-org/php-classy-standards

使用方法

# Testing php files comply with Classy coding standards
vendor/bin/php-classy-fixer fix --dry-run

# Fixing files
vendor/bin/php-classy-fixer fix

# Configure git to automatically fix php files on commit
ln -s ../../vendor/bin/php-classy-precommit-hook .git/hooks/pre-commit

由于php-classy-standards是在php-cs-fixer的基础上进行简单封装,并预配置了我们在Classy中使用的规则,因此您可以传递任何php-cs-fixer接受的参数。示例

vendor/bin/php-classy-fixer fix --dry-run ./folder/with/files/to/check