File tree 3 files changed +5
-9
lines changed
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 15
15
"clue/redis-protocol" : " 0.3.*" ,
16
16
"evenement/evenement" : " ^3.0 || ^2.0 || ^1.0" ,
17
17
"react/event-loop" : " ^1.2" ,
18
- "react/promise" : " ^3 || ^2.0 || ^1.1 " ,
18
+ "react/promise" : " ^3" ,
19
19
"react/promise-timer" : " ^1.10" ,
20
20
"react/socket" : " ^1.15"
21
21
},
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ parameters:
6
6
- src/
7
7
- tests/
8
8
9
- reportUnmatchedIgnoredErrors: false
10
9
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\.$/'
13
10
# ignore undefined methods due to magic `__call()` method
14
11
- '/^Call to an undefined method Clue\\React\\Redis\\RedisClient::.+\(\)\.$/'
15
12
- '/^Call to an undefined method Clue\\React\\Redis\\Io\\StreamingClient::.+\(\)\.$/'
Original file line number Diff line number Diff line change 2
2
3
3
namespace Clue \Tests \React \Redis ;
4
4
5
- use PHPUnit \Framework \MockObject \MockBuilder ;
6
5
use PHPUnit \Framework \MockObject \MockObject ;
7
6
use PHPUnit \Framework \TestCase as BaseTestCase ;
8
7
use React \Promise \PromiseInterface ;
@@ -39,12 +38,12 @@ protected function expectCallableNever(): callable
39
38
40
39
protected function createCallableMock (): MockObject
41
40
{
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 ();
45
44
} else {
46
45
// legacy PHPUnit < 9
47
- return $ this -> getMockBuilder (\stdClass::class) ->setMethods (['__invoke ' ])->getMock ();
46
+ return $ builder ->setMethods (['__invoke ' ])->getMock ();
48
47
}
49
48
}
50
49
You can’t perform that action at this time.
0 commit comments