Skip to content

Commit dbbca95

Browse files
authored
Fix CS (#134)
1 parent 13ec0bc commit dbbca95

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/Cache/PropertyResolver/MethodResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testResolveMethod(string $target, int $invocationCount): void
4646

4747
$classMetadata = self::createStub(ClassMetadata::class);
4848
$classMetadata->method('hasField')
49-
->willReturnCallback(fn (string $property) => match ($property) {
49+
->willReturnCallback(static fn (string $property) => match ($property) {
5050
'bar' => true,
5151
'baz' => true,
5252
});

tests/Cache/Subscription/PurgeSubscriptionProviderTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testWithoutTarget(RouteMetadata $routeMetadata, array $expectedS
3838
{
3939
$routeMetadataProvider = self::createStub(RouteMetadataProviderInterface::class);
4040
$routeMetadataProvider->method('provide')
41-
->willReturnCallback(function () use ($routeMetadata) {
41+
->willReturnCallback(static function () use ($routeMetadata) {
4242
yield $routeMetadata;
4343
});
4444

@@ -138,7 +138,7 @@ public function testWithTarget(RouteMetadata $routeMetadata, array $targetResolv
138138
{
139139
$subscriptionResolver = self::createStub(SubscriptionResolverInterface::class);
140140
$subscriptionResolver->method('resolveSubscription')
141-
->willReturnCallback(function () use ($expectedSubscriptions) {
141+
->willReturnCallback(static function () use ($expectedSubscriptions) {
142142
static $i = 0;
143143

144144
yield $expectedSubscriptions[$i++];
@@ -148,7 +148,7 @@ public function testWithTarget(RouteMetadata $routeMetadata, array $targetResolv
148148

149149
$routeMetadataProvider = self::createStub(RouteMetadataProviderInterface::class);
150150
$routeMetadataProvider->method('provide')
151-
->willReturnCallback(function () use ($routeMetadata) {
151+
->willReturnCallback(static function () use ($routeMetadata) {
152152
yield $routeMetadata;
153153
});
154154

@@ -300,7 +300,7 @@ public function testExceptionIsThrownWhenEntityMetadataIsNotFound(): void
300300
{
301301
$routeMetadataProvider = self::createStub(RouteMetadataProviderInterface::class);
302302
$routeMetadataProvider->method('provide')
303-
->willReturnCallback(function () {
303+
->willReturnCallback(static function () {
304304
yield new RouteMetadata(
305305
routeName: 'foo',
306306
route: new Route('/foo'),
@@ -338,7 +338,7 @@ public function testWithMissingRouteParams(
338338
): void {
339339
$routeMetadataProvider = self::createStub(RouteMetadataProviderInterface::class);
340340
$routeMetadataProvider->method('provide')
341-
->willReturnCallback(function () use ($routeMetadata) {
341+
->willReturnCallback(static function () use ($routeMetadata) {
342342
yield $routeMetadata;
343343
});
344344

@@ -506,7 +506,7 @@ public function testExceptionIsThrownOnInvalidIfExpression(string $if, string $e
506506
{
507507
$routeMetadataProvider = self::createStub(RouteMetadataProviderInterface::class);
508508
$routeMetadataProvider->method('provide')
509-
->willReturnCallback(function () use ($if): iterable {
509+
->willReturnCallback(static function () use ($if): iterable {
510510
yield new RouteMetadata(
511511
routeName: 'foo',
512512
route: new Route('/{foo}'),
@@ -529,7 +529,7 @@ class: 'FooEntity',
529529
public function getFunctions(): array
530530
{
531531
return [
532-
new ExpressionFunction('valid_function', function () {}, function () {}),
532+
new ExpressionFunction('valid_function', static function () {}, static function () {}),
533533
];
534534
}
535535
},

0 commit comments

Comments
 (0)