Skip to content
Merged
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"require": {
"php": "^7.1",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"slevomat/coding-standard": "^4.8.0",
"squizlabs/php_codesniffer": "^3.3.2"
},
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"/>
<!-- Checked by SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma -->
<exclude name="Squiz.Arrays.ArrayDeclaration.NoCommaAfterLast"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.NoComma"/>
</rule>
<!-- Forbid class being in a file with different name -->
<rule ref="Squiz.Classes.ClassFileName"/>
Expand Down
7 changes: 4 additions & 3 deletions tests/expected_report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ tests/input/return_type_on_closures.php 21 0
tests/input/return_type_on_methods.php 17 0
tests/input/semicolon_spacing.php 3 0
tests/input/static-closures.php 1 0
tests/input/test-case.php 6 0
tests/input/test-case.php 8 0
tests/input/trailing_comma_on_array.php 1 0
tests/input/traits-uses.php 10 0
tests/input/UnusedVariables.php 1 0
tests/input/useless-semicolon.php 2 0
----------------------------------------------------------------------
A TOTAL OF 203 ERRORS AND 0 WARNINGS WERE FOUND IN 24 FILES
A TOTAL OF 206 ERRORS AND 0 WARNINGS WERE FOUND IN 25 FILES
----------------------------------------------------------------------
PHPCBF CAN FIX 173 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
PHPCBF CAN FIX 176 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


5 changes: 2 additions & 3 deletions tests/fixed/test-case.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ public function createDependencies() : void
}

/**
* @test
* @uses MyClass::__construct
*
* @test
* @covers MyClass::test
*
* @uses MyClass::__construct
*/
public function methodShouldDoStuff() : void
{
Expand Down
8 changes: 8 additions & 0 deletions tests/fixed/trailing_comma_on_array.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

declare(strict_types=1);

$array = [
'key1' => 'value',
'key2' => 'value',
];
8 changes: 8 additions & 0 deletions tests/input/trailing_comma_on_array.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

declare(strict_types=1);

$array = [
'key1' => 'value',
'key2' => 'value'
];