File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 22Contains PHP coding standards like rules for PHP-CS-Fixer that serves for purpose of standardization.
33
44## Usage
5+ This package makes use of PHP-CS-Fixer.
6+
7+ ### Already familiar with PHP-CS-Fixer
8+
9+ This package provides default rules to be used with PHP-CS-Fixer.
10+
11+ You can find them in ` Mollie\PhpCodingStandards\PhpCsFixer\Rules ` which has methods specific to php version,
12+ which you can directly use in the ` ->setRules() ` part of your config. For example, assuming PHP version 7.3:
13+
14+ ``` php
15+ use Mollie\PhpCodingStandards\PhpCsFixer\Rules;
16+
17+ $config->setRules(Rules::getForPhp73());
18+ ```
19+
20+ ### New to PHP-CS-Fixer
21+
522Place a file named ` .php_cs.dist ` that has following content in your project's root directory.
623
724``` php
@@ -18,8 +35,8 @@ return Config::create()
1835 ->setRiskyAllowed(true)
1936 // use specific rules for your php version e.g.: getForPhp71, getForPhp72, getForPhp73
2037 ->setRules(Rules::getForPhp71());
21-
2238```
39+
2340### Manual Triggering
2441Run following command in your project directory, that will run fixer for every ` .php ` file.
2542``` bash
You can’t perform that action at this time.
0 commit comments