Failed Conditions
Pull Request — newinternal (#527)
by Simon
16:02 queued 05:59
created

UserCreationTask::getMediaWikiClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 *                                                                            *
5
 * All code in this file is released into the public domain by the ACC        *
6
 * Development Team. Please see team.json for a list of contributors.         *
7
 ******************************************************************************/
8
9
namespace Waca\Background\Task;
10
11
use Waca\Background\CreationTaskBase;
12
use Waca\Helpers\Interfaces\IMediaWikiClient;
13
use Waca\Helpers\OAuthUserHelper;
14
15
class UserCreationTask extends CreationTaskBase
16
{
17
    /**
18
     * @return IMediaWikiClient
19
     */
20
    protected function getMediaWikiClient()
21
    {
22
        $oauth = new OAuthUserHelper($this->getTriggerUser(), $this->getDatabase(), $this->getOauthProtocolHelper(),
23
            $this->getSiteConfiguration());
24
25
        return $oauth;
26
    }
27
}