diff --git a/composer.json b/composer.json
index f8ab01ea..ecac3374 100644
--- a/composer.json
+++ b/composer.json
@@ -19,9 +19,9 @@
"require": {
"php": "^7.1",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
- "slevomat/coding-standard": "^4.8.0",
+ "slevomat/coding-standard": "^5.0.4",
"squizlabs/php_codesniffer": "^3.4.0",
- "webimpress/coding-standard": "dev-master"
+ "webimpress/coding-standard": "^1.0.3"
},
"extra": {
"branch-alias": {
@@ -41,12 +41,14 @@
},
"scripts": {
"check": [
+ "@test-clean",
"@test-prepare",
"@test-fix",
"@test-diff"
],
"create-report": "phpcs $(find test/fixable/* | sort) --report=summary --report-file=test/expected-report.txt",
- "test-prepare": "rm -rf test/fix/; cp -R test/fixable/ test/fix/;",
+ "test-clean": "rm -rf test/fix/",
+ "test-prepare": "cp -R test/fixable/ test/fix/",
"test-fix": "phpcbf test/fix > /dev/null || true",
"test-diff": "diff test/fix test/fixed"
}
diff --git a/docs/book/v2/coding-style-guide.md b/docs/book/v2/coding-style-guide.md
index 777896bf..9507f08b 100644
--- a/docs/book/v2/coding-style-guide.md
+++ b/docs/book/v2/coding-style-guide.md
@@ -361,7 +361,7 @@ $instance = new class extends Foo implements
- Constructors should be named `__construct`, not after the class. [*](ruleset.md#genericnamingconventionsconstructorname)
- The opening PHP tag should be the first item in the file. [*](ruleset.md#genericphpcharacterbeforephpopeningtag)
- Strings should not be concatenated together unless used in multiline for readability. [*](ruleset.md#genericstringsunnecessarystringconcat)
-- Loose `==` and `!=` comparison operators should not be used. Use `===` and `!==` instead. [*](ruleset.md#slevomatcodingstandardcontrolstructuresdisallowequaloperators)
+- Loose `==` and `!=` comparison operators should not be used. Use `===` and `!==` instead. [*](ruleset.md#slevomatcodingOperatorsdisallowequaloperators)
- Language constructs must be used without parentheses where possible. [*](ruleset.md#slevomatcodingstandardcontrolstructureslanguageconstructwithparentheses)
- Short list syntax `[...]` should be used instead of `list(...)`. [*](ruleset.md#slevomatcodingstandardphpshortlist)
- Short form of type keywords must be used. i.e. `bool` instead of `boolean`, `int` instead of `integer`, etc.
diff --git a/docs/book/v2/ruleset.md b/docs/book/v2/ruleset.md
index 7b4b830d..6ad2d68c 100644
--- a/docs/book/v2/ruleset.md
+++ b/docs/book/v2/ruleset.md
@@ -412,7 +412,7 @@ private $foo;
private $foo;
```
-### SlevomatCodingStandard.ControlStructures.DisallowEqualOperators
+### SlevomatCodingStandard.Operators.DisallowEqualOperators
Loose `==` and `!=` comparison operators should not be used. Use strict comparison `===` and `!==` instead, they are
much more secure and predictable.
diff --git a/src/ZendCodingStandard/ruleset.xml b/src/ZendCodingStandard/ruleset.xml
index 16473ebd..31ea01ca 100644
--- a/src/ZendCodingStandard/ruleset.xml
+++ b/src/ZendCodingStandard/ruleset.xml
@@ -268,8 +268,6 @@
-
-
@@ -298,6 +296,8 @@
+
+