You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards;
5
-
whether you want to follow PHP coding standards as defined by `PER Coding Style <https://www.php-fig.org/per/coding-style/>`__,
6
-
or other community driven ones like the Symfony one.
7
-
You can **also** define your (team's) style through configuration.
8
-
9
-
It can modernize your code (like converting the ``pow`` function to the ``**`` operator on PHP 5.6)
10
-
and (micro) optimize it.
4
+
The PHP Coding Standards Fixer (PHP CS Fixer) fixes your code to follow the standards.
11
5
12
6
If you are already using a linter to identify coding standards problems in your
13
7
code, you know that fixing them by hand is tedious, especially on large
14
-
projects. This tool does not only detect them, but also fixes them for you.
8
+
projects. This tool not only detects them, but also fixes them for you.
9
+
10
+
PHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by `PHP-FIG's PER Coding Style <https://www.php-fig.org/per/coding-style/>`__,
11
+
a wide community like the `Symfony <https://symfony.com/doc/current/contributing/code/standards.html>`__,
12
+
or `our opinionated one <./doc/ruleSets/PhpCsFixer.rst>`__.
13
+
You can **also** define your (team's) style through the `configuration file <./doc/config.rst>`__.
14
+
15
+
PHP CS Fixer can not only unify the style of your code, but also help to modernize your codebase towards
@@ -39,24 +36,7 @@ The recommended way to install PHP CS Fixer is to use
39
36
$ composer require --dev php-cs-fixer/shim
40
37
41
38
42
-
For more details and other installation methods, see `installation instructions <./doc/installation.rst>`__.
43
-
44
-
Run with Docker
45
-
~~~~~~~~~~~~~~~
46
-
47
-
PHP CS Fixer can be run in a Docker container.
48
-
49
-
You can use pre-built Docker images to run ``php-cs-fixer``.
50
-
51
-
.. code:: sh
52
-
53
-
$ docker run -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src
54
-
55
-
``$FIXER_VERSION`` used in example above is an identifier of a release you want to use, which is based on Fixer and PHP versions combined. There are different tags for each Fixer's SemVer level and PHP version with syntax ``<php-cs-fixer-version>-php<php-version>``. For example:
56
-
57
-
* ``3.80.0-php8.4``
58
-
* ``3.80-php8.4``
59
-
* ``3-php8.4``
39
+
For more details and other installation methods (also with Docker or behind CI), see `installation instructions <./doc/installation.rst>`__.
60
40
61
41
Usage
62
42
~~~~~
@@ -90,10 +70,8 @@ Dedicated plugins exist for:
90
70
Community
91
71
---------
92
72
93
-
The PHP CS Fixer is maintained on GitHub at
94
-
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.
95
-
Bug reports and ideas about new features are welcome there.
73
+
The PHP CS Fixer is maintained on GitHub at https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.
74
+
Contributions, bug reports and ideas about new features are welcome there.
96
75
97
76
You can reach us at https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions about the
98
-
project, configuration, possible improvements, ideas and questions, please
99
-
visit us!
77
+
project, configuration, possible improvements, ideas and questions.
0 commit comments