Skip to content

Commit 0dbe7cb

Browse files
committed
Drop removed sniffs, add new and upgrade
1 parent 3af8d79 commit 0dbe7cb

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## v0.14.x
4+
5+
### v0.14.0
6+
**Added rules:**
7+
- SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator
8+
9+
**Removed rules:**
10+
- Generic.Functions.CallTimePassByReference - was removed in PHPCS 4.0
11+
- Generic.Formatting.NoSpaceAfterCast - was removed in PHPCS 4.0
12+
313
## v0.13.x
414

515
### v0.13.0

Rules/Parts/phpcs-generic.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> <!-- When final is for class and for method again -->
2727
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/> <!-- When method only calls parent, nothing more -->
2828
<rule ref="Generic.Files.InlineHTML"/> <!-- Disables Inline HTML inside file -->
29-
<rule ref="Generic.Functions.CallTimePassByReference"/> <!-- Cannot use reference in function call -->
30-
<rule ref="Generic.Formatting.NoSpaceAfterCast"/> <!-- Disable space after cast, ie (int) $var -->
3129
<rule ref="Generic.NamingConventions.ConstructorName"/> <!-- Check of usage old constructor naming -->
3230
<rule ref="Generic.PHP.BacktickOperator"/> <!-- Backtick is used to call shell -->
3331
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/> <!-- No chars before PHP opening tag -->

Rules/Parts/phpcs-slevomat.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<property name="lineLengthLimit" value="120"/>
6161
</properties>
6262
</rule>
63+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator"/> <!-- ??= instead of $var = $var ?? $default -->
6364
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/> <!-- Use null coalesce ?? instead of ternary when possible -->
6465
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator"/> <!-- Requires using ?-> operator -->
6566
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/> <!-- Check unreachable catch blocks -->

SniffsList.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
- Generic.Files.LineEndings
2020
- Generic.Files.LineLength
2121
- Generic.Formatting.DisallowMultipleStatements
22-
- Generic.Formatting.NoSpaceAfterCast
2322
- Generic.Formatting.SpaceAfterNot
24-
- Generic.Functions.CallTimePassByReference
2523
- Generic.Functions.FunctionCallArgumentSpacing
2624
- Generic.NamingConventions.ConstructorName
2725
- Generic.NamingConventions.UpperCaseConstantName
@@ -130,6 +128,7 @@
130128
- SlevomatCodingStandard.ControlStructures.NewWithParentheses
131129
- SlevomatCodingStandard.ControlStructures.RequireMultiLineCondition
132130
- SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator
131+
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator
133132
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
134133
- SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator
135134
- SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^7.4 || ^8.0",
15-
"slevomat/coding-standard": "^8.16.0"
15+
"slevomat/coding-standard": "^8.25.1"
1616
},
1717
"config": {
1818
"allow-plugins": {

0 commit comments

Comments
 (0)