@@ -76,7 +76,7 @@ public function testSubscribeAndSendsNotification(): void
7676
7777 $ this ->sessionStore ->expects ($ this ->exactly (2 ))
7878 ->method ('read ' )
79- ->willReturnCallback (function ($ id ) use ($ uuid1 , $ uuid2 , $ sessionData1 , $ sessionData2 ) {
79+ ->willReturnCallback (static function ($ id ) use ($ uuid1 , $ uuid2 , $ sessionData1 , $ sessionData2 ) {
8080 if ($ id === $ uuid1 ) {
8181 return $ sessionData1 ;
8282 }
@@ -89,7 +89,7 @@ public function testSubscribeAndSendsNotification(): void
8989
9090 $ this ->sessionFactory ->expects ($ this ->exactly (2 ))
9191 ->method ('createWithId ' )
92- ->willReturnCallback (function ($ id ) use ($ uuid1 , $ uuid2 , $ session1 , $ session2 ) {
92+ ->willReturnCallback (static function ($ id ) use ($ uuid1 , $ uuid2 , $ session1 , $ session2 ) {
9393 if ($ id === $ uuid1 ) {
9494 return $ session1 ;
9595 }
@@ -102,7 +102,7 @@ public function testSubscribeAndSendsNotification(): void
102102
103103 $ this ->protocol ->expects ($ this ->exactly (2 ))
104104 ->method ('sendNotification ' )
105- ->with ($ this ->callback (function ($ notification ) use ($ uri ) {
105+ ->with ($ this ->callback (static function ($ notification ) use ($ uri ) {
106106 return $ notification instanceof ResourceUpdatedNotification
107107 && $ notification ->uri === $ uri ;
108108 }));
@@ -123,7 +123,7 @@ public function testUnsubscribeRemovesOnlyTargetSession(): void
123123
124124 $ callCount = 0 ;
125125 $ session1 ->expects ($ this ->exactly (2 ))->method ('get ' )->with ('resource_subscriptions ' , [])
126- ->willReturnCallback (function () use (&$ callCount , $ uri ) {
126+ ->willReturnCallback (static function () use (&$ callCount , $ uri ) {
127127 return 0 === $ callCount ++ ? [] : [$ uri => true ];
128128 });
129129 $ session1 ->expects ($ this ->exactly (2 ))->method ('set ' )
@@ -159,7 +159,7 @@ public function testUnsubscribeRemovesOnlyTargetSession(): void
159159
160160 $ this ->protocol ->expects ($ this ->exactly (1 ))
161161 ->method ('sendNotification ' )
162- ->with ($ this ->callback (fn ($ notification ) => $ notification instanceof ResourceUpdatedNotification && $ notification ->uri === $ uri
162+ ->with ($ this ->callback (static fn ($ notification ) => $ notification instanceof ResourceUpdatedNotification && $ notification ->uri === $ uri
163163 ));
164164
165165 $ this ->subscriptionManager ->notifyResourceChanged ($ this ->protocol , $ uri );
@@ -180,7 +180,7 @@ public function testUnsubscribeDoesNotSendNotifications(): void
180180
181181 $ callCount = 0 ;
182182 $ session ->expects ($ this ->exactly (2 ))->method ('get ' )->with ('resource_subscriptions ' , [])
183- ->willReturnCallback (function () use (&$ callCount , $ uri ) {
183+ ->willReturnCallback (static function () use (&$ callCount , $ uri ) {
184184 return 0 === $ callCount ++ ? [] : [$ uri => true ];
185185 });
186186 $ session ->expects ($ this ->exactly (2 ))->method ('set ' )
0 commit comments