Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
GlobalUserSelectQueryBuilderFactory | |
0.00% |
0 / 10 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
newGlobalUserSelectQueryBuilder | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\CentralAuth\User; |
4 | |
5 | use MediaWiki\User\ActorStore; |
6 | use MediaWiki\User\TempUser\TempUserConfig; |
7 | use MediaWiki\User\UserNameUtils; |
8 | use Wikimedia\Rdbms\IReadableDatabase; |
9 | |
10 | class GlobalUserSelectQueryBuilderFactory { |
11 | |
12 | /** @var IReadableDatabase */ |
13 | private IReadableDatabase $db; |
14 | |
15 | /** @var ActorStore */ |
16 | private ActorStore $actorStore; |
17 | |
18 | /** @var UserNameUtils */ |
19 | private UserNameUtils $userNameUtils; |
20 | |
21 | private TempUserConfig $tempUserConfig; |
22 | |
23 | /** |
24 | * @param IReadableDatabase $db |
25 | * @param ActorStore $actorStore |
26 | * @param UserNameUtils $userNameUtils |
27 | * @param TempUserConfig $tempUserConfig |
28 | */ |
29 | public function __construct( |
30 | IReadableDatabase $db, |
31 | ActorStore $actorStore, |
32 | UserNameUtils $userNameUtils, |
33 | TempUserConfig $tempUserConfig |
34 | ) { |
35 | $this->db = $db; |
36 | $this->actorStore = $actorStore; |
37 | $this->userNameUtils = $userNameUtils; |
38 | $this->tempUserConfig = $tempUserConfig; |
39 | } |
40 | |
41 | /** |
42 | * @return GlobalUserSelectQueryBuilder |
43 | */ |
44 | public function newGlobalUserSelectQueryBuilder(): GlobalUserSelectQueryBuilder { |
45 | return new GlobalUserSelectQueryBuilder( |
46 | $this->db, |
47 | $this->actorStore, |
48 | $this->userNameUtils, |
49 | $this->tempUserConfig |
50 | ); |
51 | } |
52 | } |