robinp7720/Blue-Stats-Minecraft

View on GitHub

Showing 65 of 90 total issues

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

    public function searchByName ($name, $page = 0, $limit = 100) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        $name  = "%$name%";
Severity: Major
Found in classes/plugin/pluginPlayer.php and 1 other location - About 7 hrs to fix
classes/plugin/pluginPlayer.php on lines 308..332

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 243.

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

    public function searchByUUID ($uuid, $page = 0, $limit = 100) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        $uuid  = "%$uuid%";
Severity: Major
Found in classes/plugin/pluginPlayer.php and 1 other location - About 7 hrs to fix
classes/plugin/pluginPlayer.php on lines 274..298

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 243.

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

    public function getNamefromID ($id) {
        // Return false if ID column is not set
        if (!isset($this->database["index"]["columns"]["id"]))
            return FALSE;

Severity: Major
Found in classes/plugin/pluginPlayer.php and 1 other location - About 5 hrs to fix
classes/plugin/pluginPlayer.php on lines 105..131

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 196.

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

    public function getUUIDfromID ($id) {
        // Return false if ID column is not set
        if (!isset($this->database["index"]["columns"]["id"]))
            return FALSE;

Severity: Major
Found in classes/plugin/pluginPlayer.php and 1 other location - About 5 hrs to fix
classes/plugin/pluginPlayer.php on lines 70..96

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 196.

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

            "bans" => [
                "database"        => "bans",
                "user_identifier" => "uuid",
                "name"            => "Bans",
                "summary"         => "count",
Severity: Major
Found in plugins/LiteBans/LiteBans.php and 1 other location - About 5 hrs to fix
plugins/LiteBans/LiteBans.php on lines 67..109

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 194.

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

            "mutes" => [
                "database"        => "mutes",
                "user_identifier" => "uuid",
                "name"            => "Mutes",
                "summary"         => "count",
Severity: Major
Found in plugins/LiteBans/LiteBans.php and 1 other location - About 5 hrs to fix
plugins/LiteBans/LiteBans.php on lines 23..66

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 194.

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 4 locations. Consider refactoring.
Open

    public function getIDfromName ($name) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        // Select the id from the player identification table using the name column for identification
Severity: Major
Found in classes/plugin/pluginPlayer.php and 3 other locations - About 4 hrs to fix
classes/plugin/pluginPlayer.php on lines 139..161
classes/plugin/pluginPlayer.php on lines 199..221
classes/plugin/pluginPlayer.php on lines 229..251

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 167.

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 4 locations. Consider refactoring.
Open

    public function getNamefromUUID ($name) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        // Select the id from the player identification table using the name column for identification
Severity: Major
Found in classes/plugin/pluginPlayer.php and 3 other locations - About 4 hrs to fix
classes/plugin/pluginPlayer.php on lines 139..161
classes/plugin/pluginPlayer.php on lines 169..191
classes/plugin/pluginPlayer.php on lines 199..221

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 167.

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 4 locations. Consider refactoring.
Open

    public function getUUIDfromName ($name) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        // Select the id from the player identification table using the name column for identification
Severity: Major
Found in classes/plugin/pluginPlayer.php and 3 other locations - About 4 hrs to fix
classes/plugin/pluginPlayer.php on lines 139..161
classes/plugin/pluginPlayer.php on lines 169..191
classes/plugin/pluginPlayer.php on lines 229..251

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 167.

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 4 locations. Consider refactoring.
Open

    public function getIDfromUUID ($uuid) {
        $mysqli = $this->mysql;
        $stmt   = $mysqli->stmt_init();

        // Select the id from the player identification table using the uuid column for identification
Severity: Major
Found in classes/plugin/pluginPlayer.php and 3 other locations - About 4 hrs to fix
classes/plugin/pluginPlayer.php on lines 169..191
classes/plugin/pluginPlayer.php on lines 199..221
classes/plugin/pluginPlayer.php on lines 229..251

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 167.

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

            "blocks_broken"   => [
                "database"        => "blocks_broken",
                "name"            => "Blocks broken",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 2 other locations - About 3 hrs to fix
plugins/Statz/Statz.php on lines 92..128
plugins/lolmewnStats/lolmewnStats.php on lines 435..471

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 157.

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

            "blocks_placed"   => [
                "database"        => "blocks_placed",
                "name"            => "Blocks placed",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 2 other locations - About 3 hrs to fix
plugins/Statz/Statz.php on lines 55..91
plugins/lolmewnStats/lolmewnStats.php on lines 435..471

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 157.

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

            "kills"      => [
                "database"        => "kill",
                "name"            => "Kills",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 2 other locations - About 3 hrs to fix
plugins/Statz/Statz.php on lines 55..91
plugins/Statz/Statz.php on lines 92..128

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 157.

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 24 locations. Consider refactoring.
Open

            "times_kicked"    => [
                "database"        => "times_kicked",
                "name"            => "Kicks",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "items_crafted"   => [
                "database"        => "items_crafted",
                "name"            => "Items crafted",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "teleports"       => [
                "database"        => "teleports",
                "name"            => "Teleports",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "blocks_placed"   => [
                "database"        => "blocks_placed",
                "name"            => "Blocks placed",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "move"       => [
                "database"        => "move",
                "name"            => "Distance traversed",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "villager_trades" => [
                "database"        => "villager_trades",
                "name"            => "Villager trades",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 745..775
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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 24 locations. Consider refactoring.
Open

            "worlds_changed"  => [
                "database"        => "worlds_changed",
                "name"            => "Worlds changed",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/Statz/Statz.php and 23 other locations - About 2 hrs to fix
plugins/Statz/Statz.php on lines 24..54
plugins/Statz/Statz.php on lines 179..209
plugins/Statz/Statz.php on lines 235..265
plugins/Statz/Statz.php on lines 316..346
plugins/Statz/Statz.php on lines 347..377
plugins/Statz/Statz.php on lines 378..408
plugins/Statz/Statz.php on lines 409..439
plugins/Statz/Statz.php on lines 440..470
plugins/Statz/Statz.php on lines 490..520
plugins/Statz/Statz.php on lines 521..551
plugins/Statz/Statz.php on lines 552..582
plugins/Statz/Statz.php on lines 583..613
plugins/Statz/Statz.php on lines 664..694
plugins/Statz/Statz.php on lines 695..725
plugins/lolmewnStats/lolmewnStats.php on lines 74..104
plugins/lolmewnStats/lolmewnStats.php on lines 105..135
plugins/lolmewnStats/lolmewnStats.php on lines 211..241
plugins/lolmewnStats/lolmewnStats.php on lines 242..272
plugins/lolmewnStats/lolmewnStats.php on lines 323..353
plugins/lolmewnStats/lolmewnStats.php on lines 354..384
plugins/lolmewnStats/lolmewnStats.php on lines 385..415
plugins/lolmewnStats/lolmewnStats.php on lines 524..554
plugins/lolmewnStats/lolmewnStats.php on lines 792..822

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 130.

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