Skip to content

Commit 727c970

Browse files
authored
docs: update README.md (#42)
1 parent bb26926 commit 727c970

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

index.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ If you are already using a linter to identify coding standards problems in your
77
code, you know that fixing them by hand is tedious, especially on large
88
projects. This tool not only detects them, but also fixes them for you.
99

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>`__.
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/>`__ - `@PER-CS <./doc/ruleSets/PER-CS.rst>`__,
11+
a wide community like the `Symfony <https://symfony.com/doc/current/contributing/code/standards.html>`__ - `@Symfony <./doc/ruleSets/Symfony.rst>`__,
12+
or our opinionated one - `@PhpCsFixer <./doc/ruleSets/PhpCsFixer.rst>`__.
1313
You can also define your (team's) style through the `configuration file <./doc/config.rst>`__.
1414

15-
PHP CS Fixer can not only unify the style of your code, but also help to modernize your codebase towards
16-
newer PHP (e.g. `@autoPHPMigration <./doc/ruleSets/AutoPHPMigration.rst>`__) and newer PHPUnit (e.g. `@autoPHPUnitMigration:risky <./doc/ruleSets/AutoPHPUnitMigrationRisky.rst>`__).
15+
PHP CS Fixer can not only unify the style of your code, but also help to modernise your codebase towards
16+
newer PHP (e.g. `@autoPHPMigration <./doc/ruleSets/AutoPHPMigration.rst>`__ and `@autoPHPMigration:risky <./doc/ruleSets/AutoPHPMigrationRisky.rst>`__) and newer PHPUnit (e.g. `@autoPHPUnitMigration:risky <./doc/ruleSets/AutoPHPUnitMigrationRisky.rst>`__).
1717

1818
Supported PHP Versions
1919
----------------------
@@ -41,17 +41,24 @@ For more details and other installation methods (also with Docker or behind CI),
4141
Usage
4242
~~~~~
4343

44-
Assuming you installed PHP CS Fixer as instructed above, you can run
45-
the following command to fix the files PHP files in the ``src`` directory:
44+
Assuming you installed PHP CS Fixer as instructed above, you can
45+
initialise base config for your project by using following command:
4646

4747
.. code:: sh
4848
49-
$ ./vendor/bin/php-cs-fixer fix src
49+
$ ./vendor/bin/php-cs-fixer init
50+
51+
To automatically fix your project, or only check against the need of changes, run:
52+
53+
.. code:: sh
54+
55+
$ ./vendor/bin/php-cs-fixer fix
56+
$ ./vendor/bin/php-cs-fixer check
5057
5158
See `usage <./doc/usage.rst>`__, list of `built-in rules <./doc/rules/index.rst>`__, list of `rule sets <./doc/ruleSets/index.rst>`__ and `configuration file <./doc/config.rst>`__ documentation for more
5259
details.
5360

54-
If you need to apply code styles that are not supported by the tool, you can `create custom rules <./doc/custom_rules.rst>`__.
61+
If you need to apply code styles that are not built-in into the tool, you can `create custom rules <./doc/custom_rules.rst>`__.
5562

5663
Editor Integration
5764
------------------

0 commit comments

Comments
 (0)