File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1515 "clue/redis-protocol" : " 0.3.*" ,
1616 "evenement/evenement" : " ^3.0 || ^2.0 || ^1.0" ,
1717 "react/event-loop" : " ^1.2" ,
18- "react/promise" : " ^3 || ^2.0 || ^1.1 " ,
18+ "react/promise" : " ^3" ,
1919 "react/promise-timer" : " ^1.10" ,
2020 "react/socket" : " ^1.15"
2121 },
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ parameters:
66 - src/
77 - tests/
88
9- reportUnmatchedIgnoredErrors: false
109 ignoreErrors:
11- # ignore generic usage like `PromiseInterface<T>` for Promise v2/v1
12- - '/^PHPDoc tag @return contains generic type React\\Promise\\PromiseInterface<.+> but interface React\\Promise\\PromiseInterface is not generic\.$/'
1310 # ignore undefined methods due to magic `__call()` method
1411 - '/^Call to an undefined method Clue\\React\\Redis\\RedisClient::.+\(\)\.$/'
1512 - '/^Call to an undefined method Clue\\React\\Redis\\Io\\StreamingClient::.+\(\)\.$/'
Original file line number Diff line number Diff line change 22
33namespace Clue \Tests \React \Redis ;
44
5- use PHPUnit \Framework \MockObject \MockBuilder ;
65use PHPUnit \Framework \MockObject \MockObject ;
76use PHPUnit \Framework \TestCase as BaseTestCase ;
87use React \Promise \PromiseInterface ;
@@ -39,12 +38,12 @@ protected function expectCallableNever(): callable
3938
4039 protected function createCallableMock (): MockObject
4140 {
42- if ( method_exists (MockBuilder ::class, ' addMethods ' )) {
43- // @phpstan-ignore-next-line requires PHPUnit 9+
44- return $ this -> getMockBuilder (\stdClass::class) ->addMethods (['__invoke ' ])->getMock ();
41+ $ builder = $ this -> getMockBuilder (\stdClass ::class);
42+ if ( method_exists ( $ builder , ' addMethods ' )) {
43+ return $ builder ->addMethods (['__invoke ' ])->getMock ();
4544 } else {
4645 // legacy PHPUnit < 9
47- return $ this -> getMockBuilder (\stdClass::class) ->setMethods (['__invoke ' ])->getMock ();
46+ return $ builder ->setMethods (['__invoke ' ])->getMock ();
4847 }
4948 }
5049
You can’t perform that action at this time.
0 commit comments