Skip to content

Commit 7bc3c0f

Browse files
authored
Merge pull request #28 from leviy/master_upgrade_slevomat/coding-standard
Upgrade slevomat/coding-standard package
2 parents f352c5b + ca1b1aa commit 7bc3c0f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
1515
"escapestudios/symfony2-coding-standard": "^3.6",
1616
"phpmd/phpmd": "^2.6",
17-
"slevomat/coding-standard": "^6.0",
17+
"slevomat/coding-standard": "^7.0.1",
1818
"squizlabs/php_codesniffer": "^3.4"
1919
},
2020
"autoload": {

src/LEVIY/ruleset.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
declare(strict_types=1) (with an optional semi-colon terminator). -->
3434
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
3535
<properties>
36-
<property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/>
36+
<property name="linesCountBeforeDeclare" value="0"/>
37+
<property name="linesCountAfterDeclare" value="1"/>
3738
<property name="spacesCountAroundEqualsSign" value="0"/>
3839
</properties>
3940
</rule>

tests/expected.log

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
1818

1919

2020
FILE: tests/incorrect/strict-types.php
21-
------------------------------------------------------------------------------------------
21+
----------------------------------------------------------------------
2222
FOUND 2 ERRORS AFFECTING 1 LINE
23-
------------------------------------------------------------------------------------------
24-
1 | ERROR | [x] Expected 1 newlines between PHP open tag and declare statement, found 0.
23+
----------------------------------------------------------------------
24+
1 | ERROR | [x] Expected 0 lines before declare statement, found 0.
2525
1 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
26-
------------------------------------------------------------------------------------------
26+
----------------------------------------------------------------------
2727
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
28-
------------------------------------------------------------------------------------------
28+
----------------------------------------------------------------------
2929

3030

3131
FILE: tests/incorrect/type-hints.php

0 commit comments

Comments
 (0)