phpfmt/fmt
Composer 安装命令:
composer require phpfmt/fmt
包简介
K&R and phpfmt coding standard
README 文档
README
This project follows a Code of Conduct.
Build statuses
Requirements
- PHP >= 7.0.0 to run the formatter. Note that the formatter can parse and format even a PHP file version 4 in case needed. HHVM is not supported.
Editor Plugins
Usage
$ php fmt.phar filename.php
$ php fmt.phar --help
Usage: fmt.phar [-hv] [-o=FILENAME] [--config=FILENAME] [--cache[=FILENAME]] [options] <target>
--cache[=FILENAME] cache file. Default: .php.tools.cache
--config=FILENAME configuration file. Default: .phpfmt.ini
--dry-run Runs the formatter without atually changing files;
returns exit code 1 if changes would have been applied
--ignore=PATTERN-1,PATTERN-N,... ignore file names whose names contain any PATTERN-N
--lint-before lint files before pretty printing (PHP must be declared in %PATH%/$PATH)
--no-backup no backup file (original.php~)
--profile=NAME use one of profiles present in configuration file
--version version
-h, --help this help message
-o=- output the formatted code to standard output
-o=file output the formatted code to "file"
-v verbose
If <target> is "-", it reads from stdin
What does the Code Formatter do?
K&R configuration
| Before | After |
|
|
|
|
|
note how it sorts the use clauses, and removes unused ones
|
统计信息
- 总下载量: 1.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 631
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-10-12