GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

MediaWikiPluginInfo::getDefaultConfPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/**
3
 * Copyright (c) Enalean SAS, 2013. All rights reserved
4
 * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
5
 *
6
 * This file is a part of Codendi.
7
 *
8
 * Codendi is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 2 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * Codendi is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
20
 *
21
 * Portions Copyright 2010 (c) Mélanie Le Bail
22
 */
23
require_once 'common/plugin/PluginFileInfo.class.php';
24
require_once 'MediaWikiPluginDescriptor.class.php';
25
26
class MediaWikiPluginInfo extends PluginFileInfo {
27
28
    function MediaWikiPluginInfo(&$plugin) {
29
        parent::__construct($plugin, 'mediawiki');
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (__construct() instead of MediaWikiPluginInfo()). Are you sure this is correct? If so, you might want to change this to $this->__construct().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
30
        $this->setPluginDescriptor(new MediaWikiPluginDescriptor());
31
    }
32
33
    /** @see PluginFileInfo::getDefaultConfPath() */
34
    protected function getDefaultConfPath(Plugin $plugin, $incname) {
35
        return $plugin->getFilesystemPath() .'/etc/'. $incname .'.inc.dist';
36
    }
37
}
38