sovereignbot/citadel

View on GitHub

Showing 284 of 284 total issues

Function run has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

    public function run()
    {
        $channels = $this->db->query("SELECT * FROM killmailPosting");

        foreach ($channels as $channel) {
Severity: Minor
Found in src/Plugins/onTimer/kills.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<?php

namespace Sovereign\Plugins\onVoice;

use Discord\Discord;
Severity: Major
Found in src/Plugins/onVoice/horn.php and 2 other locations - About 7 hrs to fix
src/Plugins/onVoice/reapers.php on lines 1..32
src/Plugins/onVoice/warnings.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 240.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<?php

namespace Sovereign\Plugins\onVoice;

use Discord\Discord;
Severity: Major
Found in src/Plugins/onVoice/warnings.php and 2 other locations - About 7 hrs to fix
src/Plugins/onVoice/horn.php on lines 1..32
src/Plugins/onVoice/reapers.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 240.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<?php

namespace Sovereign\Plugins\onVoice;

use Discord\Discord;
Severity: Major
Found in src/Plugins/onVoice/reapers.php and 2 other locations - About 7 hrs to fix
src/Plugins/onVoice/horn.php on lines 1..32
src/Plugins/onVoice/warnings.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 240.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method run has 174 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function run()
    {
        // Reap the threads!
        $this->websocket->loop->addPeriodicTimer(600, function () {
            $this->log->addInfo('Restarting the threading pool, to clear out old threads..');
Severity: Major
Found in src/Sovereign.php - About 6 hrs to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                            case "alliance":
                                if ($kill->victim->allianceID == $id) {
                                    $msg = "{$kill->victim->characterName} ({$kill->victim->corporationName} / {$kill->victim->allianceName}) lost {$kill->victim->shipTypeName} in {$kill->solarSystemName} ({$kill->regionName}) with a total value of {$kill->totalValue}isk";
                                    $this->db->execute("UPDATE killmailPosting SET latestKillID = :killID WHERE id = :rowID", array(":killID" => $kill->killID, ":rowID" => $rowID));
                                }
Severity: Major
Found in src/Plugins/onTimer/kills.php and 1 other location - About 5 hrs to fix
src/Plugins/onTimer/kills.php on lines 104..116

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 197.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                            case "corporation":
                                if ($kill->victim->corporationID == $id) {
                                    $msg = "{$kill->victim->characterName} ({$kill->victim->corporationName} / {$kill->victim->allianceName}) lost {$kill->victim->shipTypeName} in {$kill->solarSystemName} ({$kill->regionName}) with a total value of {$kill->totalValue}isk";
                                    $this->db->execute("UPDATE killmailPosting SET latestKillID = :killID WHERE id = :rowID", array(":killID" => $kill->killID, ":rowID" => $rowID));
                                }
Severity: Major
Found in src/Plugins/onTimer/kills.php and 1 other location - About 5 hrs to fix
src/Plugins/onTimer/kills.php on lines 117..129

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 197.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function run has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    public function run()
    {
        $guildID = $this->message->full_channel->guild->id;
        $input = explode(" ", $this->message->content);
        unset($input[0]);
Severity: Minor
Found in src/Plugins/onMessage/config.php - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method run has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function run()
    {
        $guildID = $this->message->full_channel->guild->id;
        $input = explode(" ", $this->message->content);
        unset($input[0]);
Severity: Major
Found in src/Plugins/onMessage/config.php - About 3 hrs to fix

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/config.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/char.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/memory.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/time.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/corp.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/auth.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/about.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/tq.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/eightball.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/pc.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/join.php on lines 67..81
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 17 locations. Consider refactoring.
Open

    public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
    {
        $this->message = $message;
        $this->discord = $discord;
        $this->channelConfig = $channelConfig;
Severity: Major
Found in src/Plugins/onMessage/join.php and 16 other locations - About 3 hrs to fix
src/Plugins/onMessage/about.php on lines 68..82
src/Plugins/onMessage/auth.php on lines 69..83
src/Plugins/onMessage/char.php on lines 67..81
src/Plugins/onMessage/coinflip.php on lines 67..81
src/Plugins/onMessage/config.php on lines 66..80
src/Plugins/onMessage/corp.php on lines 67..81
src/Plugins/onMessage/eightball.php on lines 67..81
src/Plugins/onMessage/guilds.php on lines 68..82
src/Plugins/onMessage/meme.php on lines 67..81
src/Plugins/onMessage/memory.php on lines 67..81
src/Plugins/onMessage/pc.php on lines 68..82
src/Plugins/onMessage/porn.php on lines 67..81
src/Plugins/onMessage/time.php on lines 69..83
src/Plugins/onMessage/tq.php on lines 67..81
src/Plugins/onMessage/user.php on lines 67..81
src/Plugins/onMessage/wolf.php on lines 67..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language