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

UserCreationTask   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMediaWikiClient() 0 7 1
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
}