gossi/php-code-formatter
Composer 安装命令:
composer require gossi/php-code-formatter
包简介
A code formatter for php code
关键字:
README 文档
README
A library for formatting php code.
Features
- Whitespace
- New lines
- Indentation (on curly braces only)
- Blanks (partial support)
-> Wishlist
Getting started
Installation
Via composer:
composer require gossi/php-code-formatter
From Code
This simple code snippet is all you need:
use gossi\formatter\Formatter; $formatter = new Formatter(); $beautifulCode = $formatter->format($uglyCode);
From CLI
A bare cli version is available:
vendor/bin/phormat path/to/file.php
will output the formatted source code to stdout
Development
php code formatter is not yet finished (see Wishlist). Please help the development, by picking one of the open issues or implement your own rules. See the wiki on creating your own rules.
Psr-2? Spaces suck, deal with it :p Once Version 1.0 is reached, a psr-2 profile will be shipped.
统计信息
- 总下载量: 12.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 32
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-05