diff --git a/README.md b/README.md index bc400b2..da87ff0 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti | OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) | | Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | Perl | `Perl`, `Perl 6` |`.pl` | [`Perltidy`](http://perltidy.sourceforge.net/) (Default) | -| PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) | +| PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (Default), [`PHPCBF`](http://php.net/manual/en/install.php), [`hh_format`](http://hhvm.com/) | | Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) | | Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`yapf`](https://github.com/google/yapf) | | R | `R` |`.r`, `.R` | [`formatR`](https://github.com/yihui/formatR) (Default) | diff --git a/docs/options.md b/docs/options.md index a06d860..561ec45 100644 --- a/docs/options.md +++ b/docs/options.md @@ -9043,18 +9043,18 @@ Specify a configuration file which will override the default name of .perltidyrc #### [PHP](#php) -**Supported Beautifiers**: [`PHP-CS-Fixer`](#php-cs-fixer) [`PHPCBF`](#phpcbf) +**Supported Beautifiers**: [`hh_format`](#hh_format) [`PHP-CS-Fixer`](#php-cs-fixer) [`PHPCBF`](#phpcbf) -| Option | PHP-CS-Fixer | PHPCBF | -| --- | --- | --- | -| `disabled` | :white_check_mark: | :white_check_mark: | -| `default_beautifier` | :white_check_mark: | :white_check_mark: | -| `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `cs_fixer_path` | :white_check_mark: | :x: | -| `fixers` | :white_check_mark: | :x: | -| `level` | :white_check_mark: | :x: | -| `phpcbf_path` | :white_check_mark: | :x: | -| `standard` | :white_check_mark: | :white_check_mark: | +| Option | PHP-CS-Fixer | PHPCBF | hh_format | +| --- | --- | --- | --- | +| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `cs_fixer_path` | :white_check_mark: | :x: | :x: | +| `fixers` | :white_check_mark: | :x: | :x: | +| `level` | :white_check_mark: | :x: | :x: | +| `phpcbf_path` | :white_check_mark: | :x: | :x: | +| `standard` | :white_check_mark: | :white_check_mark: | :x: | **Description**: @@ -9085,7 +9085,7 @@ Disable PHP Beautification **Type**: `string` -**Enum**: `PHP-CS-Fixer` `PHPCBF` +**Enum**: `hh_format` `PHP-CS-Fixer` `PHPCBF` **Description**: diff --git a/package.json b/package.json index ecef1be..fcc62cc 100644 --- a/package.json +++ b/package.json @@ -290,7 +290,8 @@ "cljfmt", "bash", "beautysh", - "glsl" + "glsl", + "hh_format" ], "devDependencies": { "coffeelint": "^1.10.1", @@ -304,4 +305,4 @@ "lint": "coffeelint src/ spec/", "code-docs": "codo && open docs/code/index.html" } -} +} \ No newline at end of file diff --git a/src/languages/php.coffee b/src/languages/php.coffee index c50aa8a..ef8eade 100644 --- a/src/languages/php.coffee +++ b/src/languages/php.coffee @@ -19,6 +19,8 @@ module.exports = { "inc" ] + defaultBeautifier: "PHP-CS-Fixer" + options: cs_fixer_path: title: "PHP-CS-Fixer Path"