Skip to content

Commit c98b8a2

Browse files
authored
Merge pull request #29 from worksome/feature/skips-method
chore: add support for retrieving skips
2 parents b20b3fd + 7eac7f4 commit c98b8a2

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Pest ${{ matrix.test-suite }} on PHP ${{ matrix.php }}
1111
strategy:
1212
matrix:
13-
php: ["8.0", "8.1"]
13+
php: [8.1]
1414
test-suite: ['phpcsfixer', 'phpstan', 'rector']
1515

1616
steps:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Worksomes coding style",
44
"type": "composer-plugin",
55
"require": {
6-
"PHP": "^8.0",
6+
"PHP": "^8.1",
77
"composer-plugin-api": "^2.0",
88
"canvural/larastan-strict-rules": "^1.0 || ^2.0",
99
"friendsofphp/php-cs-fixer": "^3.8",

src/WorksomeEcsConfig.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ public static function setup(ECSConfig $ecsConfig): void
7676
SetList::PSR_12,
7777
]);
7878

79-
$ecsConfig->skip([
80-
FunctionDeclarationFixer::class,
81-
BinaryOperatorSpacesFixer::class,
82-
UnaryOperatorSpacesFixer::class,
83-
]);
79+
$ecsConfig->skip(self::skips());
8480

8581
$ecsConfig->ruleWithConfiguration(RequireMultiLineTernaryOperatorSniff::class, [
8682
'lineLengthLimit' => 120,
@@ -183,4 +179,14 @@ public static function setup(ECSConfig $ecsConfig): void
183179
PropertyDollarSignSniff::class,
184180
]);
185181
}
182+
183+
public static function skips(array $additional = []): array
184+
{
185+
return [
186+
FunctionDeclarationFixer::class,
187+
BinaryOperatorSpacesFixer::class,
188+
UnaryOperatorSpacesFixer::class,
189+
...$additional,
190+
];
191+
}
186192
}

0 commit comments

Comments
 (0)