| layout |
project |
| title |
Prettier PHP plugin |
| order |
prettier php plugin |
| tags |
|
| slug |
prettier-php-plugin |
| authors |
|
| website |
|
| license |
|
| github |
|
| dependencies |
|
| node |
| suffix |
packages |
commands |
yarn |
npm |
dev |
as a dev dependency |
| name |
version |
prettier |
latest |
|
| name |
version |
@prettier/plugin-php |
latest |
|
|
| description |
executable |
arguments |
Run it |
prettier |
path/to/file.php --write |
|
|
true |
true |
true |
|
| suffix |
packages |
commands |
yarn |
npm |
global |
as a global dependency |
| name |
version |
prettier |
latest |
|
| name |
version |
@prettier/plugin-php |
latest |
|
|
| description |
executable |
arguments |
Run it |
prettier |
path/to/file.php --write |
|
|
true |
true |
true |
|
|
[{{ page.title }}]({{ page.url | absolute_url }}) adds support for the PHP language to Prettier,
an opinionated code formatter.
Prettier enforces a consistent style by parsing your code and re-printing it with its own rules
that take the maximum line length into account, wrapping code when necessary.
Note: this plugin can also be integrated with [php-cs-fixer]({{ site.projects | where: 'title', 'PHP Coding Standards Fixer 2' | map: 'url' | first | absolute_url }}).
See docs/recipes/php-cs-fixer for integration help,
code can also be found in https://gist.github.com/Billz95/9d5fad3af728b88540fa831b73261733