Skip to content

Commit c49f80c

Browse files
committed
README fixes
1 parent 085af5f commit c49f80c

File tree

9 files changed

+32
-33
lines changed

9 files changed

+32
-33
lines changed

doc/attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#### SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing 🔧
44

5-
Checks lines count between attribute and its target (or target's documentation comment).
5+
Sniff checks lines count between attribute and its target (or target's documentation comment).
66

77
Sniff provides the following settings:
88

@@ -11,7 +11,7 @@ Sniff provides the following settings:
1111

1212
#### SlevomatCodingStandard.Attributes.AttributesOrder 🔧
1313

14-
Requires order of attributes. When more attributes are in one `#[]`, eg. `#[One, Two]`, the first attribute name is used to resolve the order.
14+
Requires order of attributes. When more attributes are in one `#[]`, e.g. `#[One, Two]`, the first attribute name is used to resolve the order.
1515

1616
Sniff provides the following settings:
1717

doc/classes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public const BAR = 2; // correct
3232

3333
#### SlevomatCodingStandard.Classes.ClassMemberSpacing 🔧
3434

35-
Checks lines count between different class members, eg. between last property and first method.
35+
Sniff checks lines count between different class members, e.g. between last property and first method.
3636

3737
Sniff provides the following settings:
3838

@@ -69,7 +69,7 @@ constants, properties, static properties, methods, all public methods, all prote
6969

7070
<element value="enum cases"/>
7171

72-
<!-- Public constants are first but you don't care about the order of protected or private constants -->
72+
<!-- Public constants are first, but you don't care about the order of protected or private constants -->
7373
<element value="public constants"/>
7474
<element value="constants"/>
7575

@@ -208,11 +208,11 @@ This sniff provides the following setting:
208208

209209
#### SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature 🔧
210210

211-
Enforces method signature to be splitted to more lines so each parameter is on its own line.
211+
Enforces method signature to be split to more lines so each parameter is on its own line.
212212

213213
Sniff provides the following settings:
214214

215-
* `minLineLength`: specifies min line length to enforce signature to be splitted. Use 0 value to enforce for all methods, regardless of length.
215+
* `minLineLength`: specifies min line length to enforce signature to be split. Use 0 value to enforce for all methods, regardless of length.
216216

217217
* `includedMethodPatterns`: allows to configure which methods are included in sniff detection. This is an array of regular expressions (PCRE) with delimiters. You should not use this with `excludedMethodPatterns`, as it will not work properly.
218218

@@ -228,7 +228,7 @@ Enforces method signature to be on a single line.
228228

229229
Sniff provides the following settings:
230230

231-
* `maxLineLength`: specifies max allowed line length. If signature would fit on it, it's enforced. Use 0 value to enforce for all methods, regardless of length.
231+
* `maxLineLength`: specifies max allowed line length. If signature fit on it, it's enforced. Use 0 value to enforce for all methods, regardless of length.
232232

233233
* `includedMethodPatterns`: allows to configure which methods are included in sniff detection. This is an array of regular expressions (PCRE) with delimiters. You should not use this with `excludedMethodPatterns`, as it will not work properly.
234234

doc/commenting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Reports `@deprecated` annotations without description.
66

77
#### SlevomatCodingStandard.Commenting.DisallowCommentAfterCode 🔧
88

9-
Disallows comments after code at the same line.
9+
Sniff disallows comments after code at the same line.
1010

1111
#### SlevomatCodingStandard.Commenting.ForbiddenAnnotations 🔧
1212

@@ -87,11 +87,11 @@ Requires property comments with single-line content to be written as one-liners.
8787

8888
#### SlevomatCodingStandard.Commenting.RequireOneLineDocComment 🔧
8989

90-
Requires comments with single-line content to be written as one-liners.
90+
Sniff requires comments with single-line content to be written as one-liners.
9191

9292
#### SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment 🔧
9393

94-
Requires comments with single-line content to be written as multi-liners.
94+
Sniff requires comments with single-line content to be written as multi-liners.
9595

9696
#### SlevomatCodingStandard.Commenting.UselessFunctionDocComment 🔧
9797

@@ -100,10 +100,10 @@ Requires comments with single-line content to be written as multi-liners.
100100

101101
Sniff provides the following settings:
102102

103-
* `traversableTypeHints`: enforces which typehints must have specified contained type. E. g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
103+
* `traversableTypeHints`: enforces which typehints must have specified contained type. E.g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
104104

105105
This sniff can cause an error if you're overriding or implementing a parent method which does not have typehints. In such cases add `@phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint` annotation to the method to have this sniff skip it.
106106

107107
#### SlevomatCodingStandard.Commenting.UselessInheritDocComment 🔧
108108

109-
Reports documentation comments containing only `{@inheritDoc}` annotation because inheritance is automatic and it's not needed to use a special annotation for it.
109+
Reports documentation comments containing only `{@inheritDoc}` annotation because inheritance is automatic, and it's not needed to use a special annotation for it.

doc/control-structures.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Control structures
22

3-
43
#### SlevomatCodingStandard.ControlStructures.AssignmentInCondition
54

65
Disallows assignments in `if`, `elseif` and `do-while` loop conditions:
@@ -118,13 +117,13 @@ Ternary operator has to be reformatted when the operator is not leading the line
118117
```php
119118
# wrong
120119
$t = $someCondition ?
121-
$thenThis :
122-
$otherwiseThis;
120+
$thenThis :
121+
$otherwiseThis;
123122

124123
# correct
125124
$t = $someCondition
126-
? $thenThis
127-
: $otherwiseThis;
125+
? $thenThis
126+
: $otherwiseThis;
128127
```
129128

130129
#### SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing 🔧

doc/files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Enforces maximum length of a single line of code.
1515
Sniff provides the following settings:
1616

1717
* `lineLengthLimit`: actual limit of the line length
18-
* `ignoreComments`: whether or not to ignore line length of comments
19-
* `ignoreImports`: whether or not to ignore line length of import (use) statements
18+
* `ignoreComments`: whether to ignore line length of comments
19+
* `ignoreImports`: whether to ignore line length of import (use) statements
2020

2121
#### SlevomatCodingStandard.Files.TypeNameMatchesFileName
2222

doc/functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Sniff provides the following settings:
3838

3939
#### SlevomatCodingStandard.Functions.RequireMultiLineCall 🔧
4040

41-
Enforces function call to be splitted to more lines so each parameter is on its own line.
41+
Enforces function call to be split to more lines so each parameter is on its own line.
4242

4343
Sniff provides the following settings:
4444

45-
* `minLineLength`: specifies min line length to enforce call to be splitted. Use 0 value to enforce for all calls, regardless of length.
45+
* `minLineLength`: specifies min line length to enforce call to be split. Use 0 value to enforce for all calls, regardless of length.
4646

4747
#### SlevomatCodingStandard.Functions.RequireSingleLineCall 🔧
4848

doc/namespaces.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#### SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses 🔧
44

5-
Checks whether uses at the top of a file are alphabetically sorted. Follows natural sorting and takes edge cases with special symbols into consideration. The following code snippet is an example of correctly sorted uses:
5+
Sniff checks whether `use` declarations at the top of a file are alphabetically sorted. Follows natural sorting and takes edge cases with special symbols into consideration. The following code snippet is an example of correctly sorted uses:
66

77
```php
88
use LogableTrait;
@@ -128,7 +128,7 @@ Sniff provides the following settings:
128128

129129
#### SlevomatCodingStandard.Namespaces.UseFromSameNamespace 🔧
130130

131-
Prohibits uses from the same namespace:
131+
Sniff prohibits uses from the same namespace:
132132

133133
```php
134134
namespace Foo;
@@ -156,11 +156,11 @@ Sniff provides the following settings:
156156

157157
#### SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces
158158

159-
Disallows uses of other than configured namespaces.
159+
Sniff disallows uses of other than configured namespaces.
160160

161161
Sniff provides the following settings:
162162

163-
* `namespacesRequiredToUse`: namespaces in this array are the only ones allowed to be used. E. g. root project namespace.
163+
* `namespacesRequiredToUse`: namespaces in this array are the only ones allowed to be used. E.g. root project namespace.
164164
* `allowUseFromRootNamespace`: also allow using top-level namespace:
165165

166166
```php
@@ -178,5 +178,5 @@ Looks for unused imports from other namespaces.
178178
Sniff provides the following settings:
179179

180180
* `searchAnnotations` (defaults to `false`): enables searching for class names in annotations.
181-
* `ignoredAnnotationNames`: case sensitive list of annotation names that the sniff should ignore (only the name is ignored, annotation content is still searched). Useful for name collisions like `@testCase` annotation and `TestCase` class.
182-
* `ignoredAnnotations`: case sensitive list of annotation names that the sniff ignore completely (both name and content are ignored). Useful for name collisions like `@group Cache` annotation and `Cache` class.
181+
* `ignoredAnnotationNames`: case-sensitive list of annotation names that the sniff should ignore (only the name is ignored, annotation content is still searched). Useful for name collisions like `@testCase` annotation and `TestCase` class.
182+
* `ignoredAnnotations`: case-sensitive list of annotation names that the sniff ignore completely (both name and content are ignored). Useful for name collisions like `@group Cache` annotation and `Cache` class.

doc/php.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Disallows direct call of `__invoke()`.
66

77
#### SlevomatCodingStandard.PHP.DisallowReference
88

9-
Disallows references.
9+
Sniff disallows usage of references.
1010

1111
#### SlevomatCodingStandard.PHP.ForbiddenClasses 🔧
1212

@@ -73,7 +73,7 @@ Looks for useless parentheses.
7373

7474
Sniff provides the following settings:
7575

76-
* `ignoreComplexTernaryConditions` (defaults to `false`): ignores complex ternary conditions - condition must contain `&&`, `||` etc or end of line.
76+
* `ignoreComplexTernaryConditions` (defaults to `false`): ignores complex ternary conditions - condition must contain `&&`, `||` etc. or end of line.
7777

7878
#### SlevomatCodingStandard.PHP.UselessSemicolon 🔧
7979

doc/type-hints.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Sniff provides the following settings:
1313

1414
#### SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax 🔧
1515

16-
Disallows usage of array type hint syntax (eg. `int[]`, `bool[][]`) in phpDocs in favour of generic type hint syntax (eg. `array<int>`, `array<array<bool>>`).
16+
Disallows usage of array type hint syntax (e.g. `int[]`, `bool[][]`) in phpDocs in favour of generic type hint syntax (eg. `array<int>`, `array<array<bool>>`).
1717

1818
Sniff provides the following settings:
1919

@@ -57,7 +57,7 @@ Sniff provides the following settings:
5757
* `enableUnionTypeHint`: enforces to transform `@param string|int` into native `string|int` typehint. It's on by default if you're on PHP 8.0+
5858
* `enableIntersectionTypeHint`: enforces to transform `@param Foo&Bar` into native `Foo&Bar` typehint. It's on by default if you're on PHP 8.1+
5959
* `enableStandaloneNullTrueFalseTypeHints`: enforces to transform `@param true`, `@param false` or `@param null` into native typehints. It's on by default if you're on PHP 8.2+
60-
* `traversableTypeHints`: enforces which typehints must have specified contained type. E. g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
60+
* `traversableTypeHints`: enforces which typehints must have specified contained type. E.g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
6161

6262
This sniff can cause an error if you're overriding or implementing a parent method which does not have typehints. In such cases add `@phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint` annotation to the method to have this sniff skip it.
6363

@@ -79,7 +79,7 @@ Sniff provides the following settings:
7979
* `enableUnionTypeHint`: enforces to transform `@var string|int` into native `string|int` typehint. It's on by default if you're on PHP 8.0+. It can be enabled only when `enableNativeTypeHint` is enabled too.
8080
* `enableIntersectionTypeHint`: enforces to transform `@var Foo&Bar` into native `Foo&Bar` typehint. It's on by default if you're on PHP 8.1+. It can be enabled only when `enableNativeTypeHint` is enabled too.
8181
* `enableStandaloneNullTrueFalseTypeHints`: enforces to transform `@var true`, `@var false` or `@var null` into native typehints. It's on by default if you're on PHP 8.2+. It can be enabled only when `enableNativeTypeHint` is enabled too.
82-
* `traversableTypeHints`: enforces which typehints must have specified contained type. E. g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
82+
* `traversableTypeHints`: enforces which typehints must have specified contained type. E.g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
8383

8484
This sniff can cause an error if you're overriding parent property which does not have typehints. In such cases add `@phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint` annotation to the property to have this sniff skip it.
8585

@@ -98,7 +98,7 @@ Sniff provides the following settings:
9898
* `enableIntersectionTypeHint`: enforces to transform `@return Foo&Bar` into native `Foo&Bar` typehint. It's on by default if you're on PHP 8.1+.
9999
* `enableNeverTypeHint`: enforces to transform `@return never` into native `never` typehint. It's on by default if you're on PHP 8.1+.
100100
* `enableStandaloneNullTrueFalseTypeHints`: enforces to transform `@return true`, `@return false` or `@return null` into native typehints. It's on by default if you're on PHP 8.2+.
101-
* `traversableTypeHints`: enforces which typehints must have specified contained type. E. g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
101+
* `traversableTypeHints`: enforces which typehints must have specified contained type. E.g. if you set this to `\Doctrine\Common\Collections\Collection`, then `\Doctrine\Common\Collections\Collection` must always be supplied with the contained type: `\Doctrine\Common\Collections\Collection|Foo[]`.
102102

103103
This sniff can cause an error if you're overriding or implementing a parent method which does not have typehints. In such cases add `@phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint` annotation to the method to have this sniff skip it.
104104

0 commit comments

Comments
 (0)