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
[](https://github.com/leviy/php-coding-standard/blob/master/composer.json)
6
6
7
-
The LEVIY coding standard for PHP code, including a PHPCS ruleset.
7
+
The LEVIY coding standard for PHP code, with rulesets for
8
+
[PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) and
9
+
[PHP Mess Detector](https://phpmd.org/).
8
10
9
11
## Installation
10
12
11
-
Install the coding standard using [Composer](https://getcomposer.org/):
13
+
Install this package using [Composer](https://getcomposer.org/):
12
14
13
15
```bash
14
16
composer require --dev leviy/coding-standard
15
17
```
16
18
17
-
Create a `phpcs.xml` file containing the following bootstrap code sniffer configuration:
19
+
### Installing the PHP CodeSniffer ruleset
20
+
21
+
Create a file `phpcs.xml` in the root of the project with the following contents:
18
22
19
23
```xml
20
24
<?xml version="1.0"?>
@@ -31,30 +35,45 @@ Create a `phpcs.xml` file containing the following bootstrap code sniffer config
31
35
</ruleset>
32
36
```
33
37
34
-
An annotated `ruleset.xml` configuration file can be found [here](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml)
35
-
where you can see the complete range of features and configuration options that can be used to modify the configuration to your project needs.
38
+
### Installing the PHP Mess Detector ruleset
36
39
37
-
## Usage
40
+
Create a file `phpmd.xml` in the root of the project with the following contents:
38
41
39
-
Run the code sniffer and show both errors and warnings:
0 commit comments