Skip to content

Commit 486d9cb

Browse files
committed
Upgrade to new Coding Standard
This also moves checking to PHP8 as the new default version.
1 parent 1eb5ea4 commit 486d9cb

File tree

5 files changed

+49
-60
lines changed

5 files changed

+49
-60
lines changed

Diff for: .github/workflows/check-cs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup PHP
2626
uses: shivammathur/setup-php@v2
2727
with:
28-
php-version: 7.4
28+
php-version: 8.x
2929
coverage: none
3030
tools: composer, cs2pr
3131

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"require-dev": {
1717
"squizlabs/php_codesniffer": "^3.4",
18-
"dms/coding-standard": "^8"
18+
"dms/coding-standard": "^9"
1919
},
2020
"autoload": {
2121
"files": ["assertarraysubset-autoload.php"]

Diff for: composer.lock

+44-48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: phpcs.xml.dist

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
<rule ref="DMS">
1515
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
16+
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"/>
17+
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint"/>
1618
</rule>
1719

1820
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator">
@@ -36,14 +38,5 @@
3638
<exclude-pattern>assertarraysubset-autoload\.php</exclude-pattern>
3739
<exclude-pattern>tests/Availability/*\.php</exclude-pattern>
3840
</rule>
39-
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
40-
<exclude-pattern>assertarraysubset-autoload\.php</exclude-pattern>
41-
<exclude-pattern>src/AssertFallThrough\.php</exclude-pattern>
42-
</rule>
43-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
44-
<exclude-pattern>assertarraysubset-autoload\.php</exclude-pattern>
45-
<exclude-pattern>src/AssertFallThrough\.php</exclude-pattern>
46-
<exclude-pattern>tests/Availability/*\.php</exclude-pattern>
47-
</rule>
4841

4942
</ruleset>

Diff for: src/ArrayAccessible.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use ArrayAccess;
77
use ArrayIterator;
88
use IteratorAggregate;
9-
use ReturnTypeWillChange; // phpcs:ignore SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse
9+
use ReturnTypeWillChange;
1010
use Traversable;
1111

1212
use function array_key_exists;

0 commit comments

Comments
 (0)