Skip to content

Commit 048dd4a

Browse files
authored
Disable obsolete QA tools and introduce CS fixer in actions (#40)
* Disable obsolete QA tools and introduce CS fixer in actions * Add CI specific run command for PHP-Cs-Fixer
1 parent 40e1f08 commit 048dd4a

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

.github/workflows/actions.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@ jobs:
1717
- 7.3
1818
- 7.4
1919
suite:
20-
- infection-ci
21-
- phan
22-
- php-cbf
23-
- php-cs
20+
- php-cs-fixer-ci
2421
- phplint
25-
- phpstan
2622
- phpunit
27-
- psalm
23+
- infection-ci
2824

2925
name: PHP ${{ matrix.php }} testing ${{ matrix.suite }}
3026
steps:

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"psalm": "vendor/bin/psalm src",
6868
"phplint": "vendor/bin/phplint src",
6969
"php-cs-fixer": "vendor/bin/php-cs-fixer fix",
70+
"php-cs-fixer-ci": "vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation",
7071
"php-cbf": "vendor/bin/phpcbf src --standard=PSR1,PSR2,PSR12",
7172
"php-cs": "vendor/bin/phpcs src --standard=PSR1,PSR2,PSR12",
7273
"phan": "vendor/bin/phan --allow-polyfill-parser src",

src/Factories/ConverterFactory.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function build(
3939
);
4040

4141
break;
42+
4243
case 'PHP_CodeSniffer':
4344
$converter = new PhpCodeSnifferConvertToSubset(
4445
$validator,
@@ -47,6 +48,7 @@ public function build(
4748
);
4849

4950
break;
51+
5052
case 'PHPLint':
5153
$converter = new PhpLintConvertToSubset(
5254
$validator,
@@ -55,6 +57,7 @@ public function build(
5557
);
5658

5759
break;
60+
5861
case 'PHPStan':
5962
$converter = new PHPStanConvertToSubset(
6063
$validator,
@@ -63,6 +66,7 @@ public function build(
6366
);
6467

6568
break;
69+
6670
case 'Psalm':
6771
$converter = new PsalmConvertToSubset(
6872
$validator,
@@ -71,6 +75,7 @@ public function build(
7175
);
7276

7377
break;
78+
7479
case 'PHP-CS-Fixer':
7580
$converter = new PHPCSFixerConvertToSubset(
7681
$validator,

src/Factories/ValidatorFactory.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,27 @@ public function build(
2828
$validator = new PhanJsonValidator($json);
2929

3030
break;
31+
3132
case 'PHP_CodeSniffer':
3233
$validator = new PhpCodeSnifferJsonValidator($json);
3334

3435
break;
36+
3537
case 'PHPLint':
3638
$validator = new PhpLintJsonValidator($json);
3739

3840
break;
41+
3942
case 'PHPStan':
4043
$validator = new PHPStanJsonValidator($json);
4144

4245
break;
46+
4347
case 'Psalm':
4448
$validator = new PsalmJsonValidator($json);
4549

4650
break;
51+
4752
case 'PHP-CS-Fixer':
4853
$validator = new PHPCSFixerJsonValidator($json);
4954

tests/Command/CommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,7 @@ public function testItExitsWithZeroExitCodeWhenErrorsWereConvertedWhenFailOnConv
925925
string $converter,
926926
array $output,
927927
string $name
928-
): void
929-
{
928+
): void {
930929
// Given
931930
$jsonFileName = __DIR__.'/..'.$jsonInput;
932931
$jsonInput = file_get_contents(__DIR__.'/..'.$jsonInput);
@@ -968,7 +967,7 @@ public function testItExitsWithZeroExitCodeWhenErrorsWereConvertedWhenFailOnConv
968967
$commandTester->execute(
969968
[
970969
$converterImplementationOptionName => true,
971-
$converterImplementationOptionFilePath => $jsonFileName
970+
$converterImplementationOptionFilePath => $jsonFileName,
972971
]
973972
);
974973

0 commit comments

Comments
 (0)