cosmocode/dokuwiki-plugin-issuelinks

View on GitHub

Showing 899 of 899 total issues

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\ServiceProvider' in method 'createOrgRepoHTML'.
Open

        $serviceProvider = ServiceProvider::getInstance();
Severity: Minor
Found in action/ajax.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\ServiceProvider' in method 'repoAdminToggle'.
Open

        $serviceProvider = ServiceProvider::getInstance();
Severity: Minor
Found in action/ajax.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\ServiceProvider' in method 'appendServicePage'.
Open

        $serviceProvider = ServiceProvider::getInstance();
Severity: Minor
Found in admin/repoadmin.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid unused parameters such as '$state'.
Open

    public function handle($match, $state, $pos, Doku_Handler $handler)
Severity: Minor
Found in syntax.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'retrieveAllIssues'.
Open

                $issue = Issue::getInstance('gitlab', $projectKey, $issueData['iid'], false);
Severity: Minor
Found in services/GitLab.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'retrieveAllIssues'.
Open

                $issue = Issue::getInstance('gitlab', $projectKey, $mrData['iid'], true);
Severity: Minor
Found in services/GitLab.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'retrieveAllIssues'.
Open

                $issue = Issue::getInstance('jira', $projectKey, $issueNumber, false);
Severity: Minor
Found in services/Jira.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid unused parameters such as '$organisation'.
Open

    public function getListOfAllReposAndHooks($organisation)
Severity: Minor
Found in services/Jira.service.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'parseIssueSyntax'.
Open

        $issue = Issue::getInstance('github', $projectKey, $issueId, false);
Severity: Minor
Found in services/GitHub.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'handleWebhook'.
Open

        $issue = Issue::getInstance(
            'gitlab',
            $data['project']['path_with_namespace'],
            $data['object_attributes']['iid'],
            $isMergeRequest
Severity: Minor
Found in services/GitLab.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid unused parameters such as '$isMergeRequest'.
Open

    public static function getProjectIssueSeparator($isMergeRequest)
Severity: Minor
Found in services/Jira.service.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'parseIssueSyntax'.
Open

        $issue = Issue::getInstance('jira', $projectKey, $issueNumber, false);
Severity: Minor
Found in services/Jira.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

The method buildTooltipHTML uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $html .= $util->getLang('no issue description');
        }
Severity: Minor
Found in classes/Issue.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid unused parameters such as '$hookid'.
Open

    public function deleteWebhook($project, $hookid)
Severity: Minor
Found in services/Jira.service.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$param'.
Open

    public function asyncImportAllIssues(Doku_Event $event, $param)
Severity: Minor
Found in action/ajax.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\ServiceProvider' in method 'importAllIssues'.
Open

        $serviceProvider = ServiceProvider::getInstance();
Severity: Minor
Found in helper/data.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'getIssue'.
Open

        $issue = Issue::getInstance($pmServiceName, $project, $issueid, $isMergeRequest);
Severity: Minor
Found in helper/data.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'handleWebhook'.
Open

        $issue = Issue::getInstance('jira', $projectKey, $issueId, false);
Severity: Minor
Found in services/Jira.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'parseIssueSyntax'.
Open

        $issue = Issue::getInstance('github', $projectKey, $issueId, true);
Severity: Minor
Found in services/GitHub.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\dokuwiki\plugin\issuelinks\classes\Issue' in method 'saveIssue'.
Open

        $issue = Issue::getInstance(
            'github',
            $data['repository']['full_name'],
            $data['issue']['number'],
            false,
Severity: Minor
Found in services/GitHub.service.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Severity
Category
Status
Source
Language