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
Copy file name to clipboardExpand all lines: wiki/About-Standards-for-PHP_CodeSniffer.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,12 +44,12 @@ You may also find the [Customisable Sniff Properties](https://github.com/PHPCSSt
44
44
45
45
1. The `--standard=...` CLI argument can be passed a comma-separated list of standards to apply, like `--standard=PSR12,myCustomRuleset.xml`.
46
46
If the CLI argument is passed, those standard(s) are applied.
47
-
2. If no `--standard=...` CLI argument is passed, PHP_CodeSniffer will look for the following files in the current directory and directories above it: `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, `phpcs.xml.dist`.
48
-
If PHP_CodeSniffer finds one of these files, that will be the ruleset which will be applied.
47
+
2. If no `--standard=...` CLI argument is passed, PHP_CodeSniffer will look for the following files in the current directory and directories above it: `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, `phpcs.xml.dist`.
48
+
If PHP_CodeSniffer finds one of these files, that will be the ruleset which will be applied.
49
49
Note: the files PHPCS looks for are listed in order of precedence, so if both a `.phpcs.xml` file as well as a `phpcs.xml.dist` file are found, the `.phpcs.xml` file takes precedence.
50
50
3. If no (project) ruleset file is found, PHP_CodeSniffer will check if a default standard has been set via `--config-set default_standard [Name]`.
51
-
If so, PHP_CodeSniffer will use that standard.
52
-
:warning: Setting the default standard is a user-specific setting, so should not be relied upon.
51
+
If so, PHP_CodeSniffer will use that standard.
52
+
⚠ Setting the default standard is a user-specific setting, so should not be relied upon.
53
53
4. If no system-default standard was set, PHP_CodeSniffer will apply the PSR12 standard.
54
54
55
55
<palign="right"><ahref="#table-of-contents">back to top</a></p>
0 commit comments