Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Use stable dependencies #19

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/book/v2/coding-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/book/v2/ruleset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/ZendCodingStandard/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
<!-- Require comments with single line @var written as one-liners -->
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
<!-- Forbid weak comparisons -->
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
<!-- Require language constructs without parentheses -->
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
<!-- Require new instances with parentheses -->
Expand Down Expand Up @@ -298,6 +296,8 @@
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing"/>
<!-- Forbid useless alias for classes, constants, functions and traits functions -->
<rule ref="WebimpressCodingStandard.Namespaces.RedundantAlias"/>
<!-- Forbid weak comparisons -->
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<!-- Require the usage of assignment operators, eg `+=`, `.=` when possible -->
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
<!-- Forbid `list(...)` syntax, use [...] instead -->
Expand Down