Skip to content

Commit 6d637bb

Browse files
committed
Remove space after short closure fn to match PER 2.0
1 parent 995deb8 commit 6d637bb

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/FixerGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function (SplFileInfo $file): object {
7777
return new $fixer();
7878
},
7979
iterator_to_array($finder, false),
80-
), static fn (object $fixer): bool => $fixer instanceof FixerInterface);
80+
), static fn(object $fixer): bool => $fixer instanceof FixerInterface);
8181

8282
yield from $fixers;
8383
}

src/Ruleset/Nexus74.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct()
148148
'fully_qualified_strict_types' => true,
149149
'function_declaration' => [
150150
'closure_function_spacing' => 'one',
151-
'closure_fn_spacing' => 'one',
151+
'closure_fn_spacing' => 'none',
152152
'trailing_comma_single_line' => false,
153153
],
154154
'function_to_constant' => [

src/Ruleset/Nexus80.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct()
148148
'fully_qualified_strict_types' => true,
149149
'function_declaration' => [
150150
'closure_function_spacing' => 'one',
151-
'closure_fn_spacing' => 'one',
151+
'closure_fn_spacing' => 'none',
152152
'trailing_comma_single_line' => false,
153153
],
154154
'function_to_constant' => [

src/Ruleset/Nexus81.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct()
148148
'fully_qualified_strict_types' => true,
149149
'function_declaration' => [
150150
'closure_function_spacing' => 'one',
151-
'closure_fn_spacing' => 'one',
151+
'closure_fn_spacing' => 'none',
152152
'trailing_comma_single_line' => false,
153153
],
154154
'function_to_constant' => [

src/Ruleset/Nexus82.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct()
148148
'fully_qualified_strict_types' => true,
149149
'function_declaration' => [
150150
'closure_function_spacing' => 'one',
151-
'closure_fn_spacing' => 'one',
151+
'closure_fn_spacing' => 'none',
152152
'trailing_comma_single_line' => false,
153153
],
154154
'function_to_constant' => [

src/Test/AbstractCustomFixerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ protected function doTest(string $expected, ?string $input = null): void
314314

315315
self::assertSame(
316316
\count($tokens),
317-
\count(array_unique(array_map(static fn (Token $token): string => spl_object_hash($token), $tokensArray))),
317+
\count(array_unique(array_map(static fn(Token $token): string => spl_object_hash($token), $tokensArray))),
318318
'Token items inside Tokens collection must be unique.',
319319
);
320320

src/Test/AbstractRulesetTestCase.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ final public function testAllConfiguredFixersAreNotUsingPresets(): void
7979
{
8080
$fixersThatArePresets = array_filter(
8181
self::$enabledFixers,
82-
static fn (string $fixer): bool => substr($fixer, 0, 1) === '@',
82+
static fn(string $fixer): bool => substr($fixer, 0, 1) === '@',
8383
ARRAY_FILTER_USE_KEY,
8484
);
8585

@@ -153,18 +153,18 @@ public function provideConfigurableFixersCases(): iterable
153153
$options = $fixer->getConfigurationDefinition()->getOptions();
154154

155155
$goodOptions = array_map(
156-
static fn (FixerOptionInterface $option): string => $option->getName(),
156+
static fn(FixerOptionInterface $option): string => $option->getName(),
157157
array_filter(
158158
$options,
159-
static fn (FixerOptionInterface $option): bool => ! $option instanceof DeprecatedFixerOptionInterface,
159+
static fn(FixerOptionInterface $option): bool => ! $option instanceof DeprecatedFixerOptionInterface,
160160
),
161161
);
162162

163163
$deprecatedOptions = array_map(
164-
static fn (FixerOptionInterface $option): string => $option->getName(),
164+
static fn(FixerOptionInterface $option): string => $option->getName(),
165165
array_filter(
166166
$options,
167-
static fn (FixerOptionInterface $option): bool => $option instanceof DeprecatedFixerOptionInterface,
167+
static fn(FixerOptionInterface $option): bool => $option instanceof DeprecatedFixerOptionInterface,
168168
),
169169
);
170170

src/Test/FixerProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public static function create(RulesetInterface $ruleset): self
3939
if ([] === self::$builtIn) {
4040
$fixers = array_filter(
4141
(new FixerFactory())->registerBuiltInFixers()->getFixers(),
42-
static fn (FixerInterface $fixer): bool => ! $fixer instanceof DeprecatedFixerInterface,
42+
static fn(FixerInterface $fixer): bool => ! $fixer instanceof DeprecatedFixerInterface,
4343
);
44-
$names = array_map(static fn (FixerInterface $fixer): string => $fixer->getName(), $fixers);
44+
$names = array_map(static fn(FixerInterface $fixer): string => $fixer->getName(), $fixers);
4545

4646
self::$builtIn = array_combine($names, $fixers);
4747
}

0 commit comments

Comments
 (0)