Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
HookRunner | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
onOAuthClaimStoreGetClaims | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\OAuth; |
4 | |
5 | use MediaWiki\Extension\OAuth\Entity\MWClientEntityInterface; |
6 | use MediaWiki\Extension\OAuth\Repository\Hook\OAuthClaimStoreGetClaimsHook; |
7 | use MediaWiki\HookContainer\HookContainer; |
8 | |
9 | class HookRunner implements OAuthClaimStoreGetClaimsHook { |
10 | |
11 | /** |
12 | * @var HookContainer |
13 | */ |
14 | private $hookContainer; |
15 | |
16 | /** |
17 | * @param HookContainer $hookContainer |
18 | */ |
19 | public function __construct( HookContainer $hookContainer ) { |
20 | $this->hookContainer = $hookContainer; |
21 | } |
22 | |
23 | /** |
24 | * @param string $grantType |
25 | * @param MWClientEntityInterface $clientEntity |
26 | * @param array &$privateClaims |
27 | * @param string|null $userIdentifier |
28 | */ |
29 | public function onOAuthClaimStoreGetClaims( |
30 | string $grantType, MWClientEntityInterface $clientEntity, array &$privateClaims, $userIdentifier = null |
31 | ) { |
32 | $this->hookContainer->run( |
33 | 'OAuthClaimStoreGetClaims', |
34 | [ $grantType, $clientEntity, &$privateClaims, $userIdentifier ] |
35 | ); |
36 | } |
37 | } |