Skip to content

Commit 1cb5127

Browse files
committed
Remove ablist language and other textual improvements
1 parent 8425b55 commit 1cb5127

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

wiki/Coding-Standard-Tutorial.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Sniffs need to follow [strict directory layout and naming conventions](https://g
44

55
## Creating the Coding Standard Directory
66

7-
All sniffs in PHP_CodeSniffer must belong to a coding standard. A coding standard is a directory with a specific sub-directory structure and a `ruleset.xml` file, so we can create one very easily. Let's call our coding standard _MyStandard_. Run the following commands to create the coding standard directory structure:
7+
All sniffs in PHP_CodeSniffer must belong to a coding standard. A coding standard is a directory with a specific sub-directory structure and a `ruleset.xml` file, so creating a standard is straight-forward.
8+
Let's call our coding standard _MyStandard_. Run the following commands to create the coding standard directory structure:
89

910
```bash
1011
$ mkdir MyStandard

wiki/FAQ.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,24 @@ No. PHP_CodeSniffer is not a tool for testing that your PHP application works co
2020

2121
Maybe you don't, but if you want to ensure you adhere to a set of coding standards, PHP_CodeSniffer is a quick and easy way to do that. PHP_CodeSniffer is a replacement for the more manual task of checking coding standards in code reviews. With PHP_CodeSniffer, you can reserve code reviews for the checking of code correctness.
2222

23-
Coding standards are a good thing. They will make your code easier to read and maintain, especially when multiple developers are working on the same application. Consider using coding standards if you don't already.
23+
Coding standards are a good thing. They will improve the code readability and make your code easier to maintain, especially when multiple developers are working on the same application. Consider using coding standards if you don't already.
2424

2525
<p align="right"><a href="#table-of-contents">back to top</a></p>
2626

2727

2828
## Does PHP_CodeSniffer parse my code to ensure it will execute?
2929

30-
No. PHP_CodeSniffer does not actually parse your code, and so cannot accurately tell if your code contains parse errors. PHP_CodeSniffer does know about some parse errors and will warn you if it finds code that it is unable to sniff correctly due to a suspected parse error. However, as there is no actual parsing taking place, PHP_CodeSniffer may return an incorrect number of errors when checking code that does contain parse errors.
30+
No. PHP_CodeSniffer does not actually parse your code, and so cannot accurately tell if your code contains parse errors. PHP_CodeSniffer does know about some parse errors and will warn you if it finds code that it is unable to sniff correctly due to a suspected parse error. However, as there is no actual parsing taking place, PHP_CodeSniffer may return an incorrect number of errors when checking code that contains parse errors.
3131

32-
You can easily check for parse errors in a file using the PHP command line interface and the `-l` (lowercase L) option.
32+
You can check for parse errors in a file using the PHP command line interface and the `-l` (lowercase L) option.
3333

3434
```bash
3535
$ php -l /path/to/code/myfile.inc
3636
No syntax errors detected in /path/to/code/myfile.inc
3737
```
3838

39+
Alternatively, you can use the `Generic.PHP.Syntax` sniff to run syntax checking as part of a PHP_CodeSniffer scan. Or you can use a dedicated (parallel) linting tool for PHP.
40+
3941
<p align="right"><a href="#table-of-contents">back to top</a></p>
4042

4143

wiki/Fixing-Errors-Automatically.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $ phpcs --report=diff /path/to/code
5656
function foo() {
5757
```
5858
59-
Diff reports are more easily used when output to a file. They can then be applied using the `patch` command:
59+
Diff reports are more straight-forward to use when output to a file. They can then be applied using the `patch` command:
6060
6161
```bash
6262
$ phpcs --report-diff=/path/to/changes.diff /path/to/code

wiki/Reporting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ $ phpcs --report=checkstyle /path/to/code
280280
281281
## Printing a CSV Report
282282
283-
PHP_CodeSniffer can output a CSV report to allow you to parse the output easily and use the results in your own scripts. To print a CSV report, use the `--report=csv` command line argument. The output will look like this:
283+
PHP_CodeSniffer can output a CSV report to allow you to parse the output and use the results in your own scripts. To print a CSV report, use the `--report=csv` command line argument. The output will look like this:
284284
285285
```bash
286286
$ phpcs --report=csv /path/to/code
@@ -398,7 +398,7 @@ A TOTAL OF 165 SNIFF VIOLATION(S) WERE COMMITTED BY 5 AUTHOR(S)
398398
399399
## Printing a JSON Report
400400
401-
PHP_CodeSniffer can output an JSON report to allow you to parse the output easily and use the results in your own scripts. To print a JSON report, use the `--report=json` command line argument. The output will look like this:
401+
PHP_CodeSniffer can output an JSON report to allow you to parse the output and use the results in your own scripts. To print a JSON report, use the `--report=json` command line argument. The output will look like this:
402402
403403
```bash
404404
$ phpcs --report=json /path/to/code
@@ -569,7 +569,7 @@ Like the Git Blame report, PHP_CodeSniffer can make use of the `svn blame` comma
569569
570570
## Printing an XML Report
571571
572-
PHP_CodeSniffer can output an XML report to allow you to parse the output easily and use the results in your own scripts. To print an XML report, use the `--report=xml` command line argument. The output will look like this:
572+
PHP_CodeSniffer can output an XML report to allow you to parse the output and use the results in your own scripts. To print an XML report, use the `--report=xml` command line argument. The output will look like this:
573573
574574
```bash
575575
$ phpcs --report=xml /path/to/code

wiki/Usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Miscellaneous Options:
122122

123123
## Checking Files and Folders
124124

125-
The simplest way of using PHP_CodeSniffer is to provide the location of a file or folder for PHP_CodeSniffer to check. If a folder is provided, PHP_CodeSniffer will check all files it finds in that folder and all its sub-folders. If you do not want sub-folders checked, use the `-l` command line argument to force PHP_CodeSniffer to run locally in the folders specified.
125+
The most straight-forward way of using PHP_CodeSniffer is to provide the location of a file or folder for PHP_CodeSniffer to check. If a folder is provided, PHP_CodeSniffer will check all files it finds in that folder and all its sub-folders. If you do not want sub-folders checked, use the `-l` command line argument to force PHP_CodeSniffer to run locally in the folders specified.
126126

127127
In the example below, the first command tells PHP_CodeSniffer to check the `myfile.inc` file for coding standard errors while the second command tells PHP_CodeSniffer to check all PHP files in the `my_dir` directory.
128128

wiki/Version-1.3.0-Upgrade-Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ These rules would be replicated in a `ruleset.xml` file like this:
6262
</ruleset>
6363
```
6464

65-
The two changes here are the use of the `rule` tag to include sniffs and standards, and also the way we reference an individual sniff. Instead of specifying the path to the sniff we instead specify the internal code that PHP_CodeSniffer gives it, which is based on the path. It's actually a pretty easy conversion. Just just drop the `Sniffs` directory, convert the slashes to periods and remove `Sniff.php` from the end. Here are some more examples to make sure it is clear.
65+
The two changes here are the use of the `rule` tag to include sniffs and standards, and also the way we reference an individual sniff. Instead of specifying the path to the sniff we instead specify the internal code that PHP_CodeSniffer gives it, which is based on the path. It's actually a pretty straight-forward conversion. Just just drop the `Sniffs` directory, convert the slashes to periods and remove `Sniff.php` from the end. Here are some more examples to make sure it is clear.
6666
```text
6767
BEFORE: Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php
6868
AFTER: Generic.VersionControl.SubversionProperties

0 commit comments

Comments
 (0)