@@ -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