Skip to content

Commit bab653d

Browse files
mhujerkukulich
authored andcommitted
fix README typos
1 parent f22992e commit bab653d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Sniff provides the following settings:
5555

5656
#### SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly 🔧
5757

58-
In PHP 7.0, a [`Throwable` interface was added](https://wiki.php.net/rfc/throwable-interface) that allows catching and handling errors in more cases than `Exception` previously allowed. So if the catch statement contained `Exception` on PHP 5.x, it means it should probably be rewritten to reference `Throwable` on PHP 7.x. This sniff enforces that.
58+
In PHP 7.0, a [`Throwable` interface was added](https://wiki.php.net/rfc/throwable-interface) that allows catching and handling errors in more cases than `Exception` previously allowed. So, if the catch statement contained `Exception` on PHP 5.x, it means it should probably be rewritten to reference `Throwable` on PHP 7.x. This sniff enforces that.
5959

6060
#### SlevomatCodingStandard.TypeHints.DeclareStrictTypes 🔧
6161

@@ -117,7 +117,7 @@ use Foo\Bar;
117117

118118
#### SlevomatCodingStandard.Exceptions.DeadCatch
119119

120-
This sniffs finds unreachable catch blocks:
120+
This sniff finds unreachable catch blocks:
121121

122122
```php
123123
try {
@@ -147,7 +147,7 @@ This sniff enforces trailing commas in multi-line arrays and requires short arra
147147

148148
`DisallowYodaComparisonSniff` looks for and fixes such comparisons not only in `if` statements but in the whole code.
149149

150-
However if you prefer Yoda conditions, you can use `RequireYodaComparisonSniff`.
150+
However, if you prefer Yoda conditions, you can use `RequireYodaComparisonSniff`.
151151

152152
#### SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses 🔧
153153

@@ -204,7 +204,7 @@ Sniff provides the following settings:
204204

205205
#### SlevomatCodingStandard.Classes.ClassConstantVisibility
206206

207-
In PHP 7.1 it's possible to declare [visibility of class constants](https://wiki.php.net/rfc/class_const_visibility). In a similar vein to optional declaration of visibility for properties and methods which is actually required in sane coding standards, this sniff also requires to declare visibility for all class constants.
207+
In PHP 7.1 it's possible to declare [visibility of class constants](https://wiki.php.net/rfc/class_const_visibility). In a similar vein to optional declaration of visibility for properties and methods which is actually required in sane coding standards, this sniff also requires declaring visibility for all class constants.
208208

209209
```php
210210
const FOO = 1; // visibility missing!
@@ -243,13 +243,13 @@ function foo(
243243

244244
#### SlevomatCodingStandard.Namespaces.DisallowGroupUse
245245

246-
[Group use declarations](https://wiki.php.net/rfc/group_use_declarations) are ugly, make diffs ugly and this sniffs prohibits them.
246+
[Group use declarations](https://wiki.php.net/rfc/group_use_declarations) are ugly, make diffs ugly and this sniff prohibits them.
247247

248248
#### SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword
249249

250250
Enforces fully qualified type references after configurable set of language keywords.
251251

252-
For example with the following setting, extended or implemented type must always be referenced with a fully qualified name:
252+
For example, with the following setting, extended or implemented type must always be referenced with a fully qualified name:
253253

254254
```xml
255255
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword">
@@ -393,15 +393,15 @@ The recommended way to install Slevomat Coding Standard is [through Composer](ht
393393
}
394394
```
395395

396-
It's also recommended to install [jakub-onderka/php-parallel-lint](https://github.com/JakubOnderka/PHP-Parallel-Lint) which checks source code for syntax errors. Sniffs count on the processed code to be syntatically valid (no parse errors), otherwise they can behave unexpectedly. It is advised to run `PHP-Parallel-Lint` in your build tool before running `PHP_CodeSniffer` and exiting the build process early if `PHP-Parallel-Lint` fails.
396+
It's also recommended to install [jakub-onderka/php-parallel-lint](https://github.com/JakubOnderka/PHP-Parallel-Lint) which checks source code for syntax errors. Sniffs count on the processed code to be syntactically valid (no parse errors), otherwise they can behave unexpectedly. It is advised to run `PHP-Parallel-Lint` in your build tool before running `PHP_CodeSniffer` and exiting the build process early if `PHP-Parallel-Lint` fails.
397397

398398
## How to run the sniffs
399399

400400
You can choose one of two ways to run only selected sniffs from the standard on your codebase:
401401

402402
### Choose which sniffs to run
403403

404-
Mention Slevomat Conding Standard in your project's `ruleset.xml`:
404+
Mention Slevomat Coding Standard in your project's `ruleset.xml`:
405405

406406
```xml
407407
<?xml version="1.0"?>
@@ -469,7 +469,7 @@ vendor/bin/phpcs --standard=ruleset.xml --extensions=php --tab-width=4 -sp src t
469469

470470
## Fixing errors automatically
471471

472-
Sniffs in this standard marked by the 🔧 symbol support [automatic fixing of coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically). To fix your code automatically, run phpcbf insteand of phpcs:
472+
Sniffs in this standard marked by the 🔧 symbol support [automatic fixing of coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically). To fix your code automatically, run phpcbf instead of phpcs:
473473

474474
```
475475
vendor/bin/phpcbf --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests

0 commit comments

Comments
 (0)