Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
GetPreferencesHandler
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 onGetPreferences
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\Wikisource\HookHandler;
4
5use MediaWiki\Preferences\Hook\GetPreferencesHook;
6use MediaWiki\User\User;
7
8class GetPreferencesHandler implements GetPreferencesHook {
9
10    /**
11     * Handle the GetPreferences hook.
12     * @param User $user
13     * @param array &$preferences
14     */
15    public function onGetPreferences( $user, &$preferences ) {
16        $preferences['wikisource-ocr'] = [
17            'type' => 'api'
18        ];
19    }
20}