robinp7720/Blue-Stats-Minecraft

View on GitHub

Showing 65 of 90 total issues

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

            "buckets_filled"  => [
                "database"        => "buckets_filled",
                "name"            => "Buckets filled",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 1 hr to fix
plugins/Statz/Statz.php on lines 129..153
plugins/Statz/Statz.php on lines 154..178
plugins/Statz/Statz.php on lines 210..234
plugins/Statz/Statz.php on lines 266..290
plugins/Statz/Statz.php on lines 291..315
plugins/Statz/Statz.php on lines 639..663
plugins/Statz/Statz.php on lines 776..800
plugins/lolmewnStats/lolmewnStats.php on lines 24..48
plugins/lolmewnStats/lolmewnStats.php on lines 49..73
plugins/lolmewnStats/lolmewnStats.php on lines 136..160
plugins/lolmewnStats/lolmewnStats.php on lines 186..210
plugins/lolmewnStats/lolmewnStats.php on lines 273..297
plugins/lolmewnStats/lolmewnStats.php on lines 298..322
plugins/lolmewnStats/lolmewnStats.php on lines 555..579
plugins/lolmewnStats/lolmewnStats.php on lines 580..604
plugins/lolmewnStats/lolmewnStats.php on lines 648..672
plugins/lolmewnStats/lolmewnStats.php on lines 673..697
plugins/lolmewnStats/lolmewnStats.php on lines 698..722
plugins/lolmewnStats/lolmewnStats.php on lines 723..747
plugins/lolmewnStats/lolmewnStats.php on lines 767..791
plugins/lolmewnStats/lolmewnStats.php on lines 823..847
plugins/lolmewnStats/lolmewnStats.php on lines 867..891
plugins/lolmewnStats/lolmewnStats.php on lines 892..916

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

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

            "eggs_thrown"     => [
                "database"        => "eggs_thrown",
                "name"            => "Eggs thrown",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 1 hr to fix
plugins/Statz/Statz.php on lines 129..153
plugins/Statz/Statz.php on lines 154..178
plugins/Statz/Statz.php on lines 210..234
plugins/Statz/Statz.php on lines 266..290
plugins/Statz/Statz.php on lines 291..315
plugins/Statz/Statz.php on lines 639..663
plugins/Statz/Statz.php on lines 776..800
plugins/lolmewnStats/lolmewnStats.php on lines 24..48
plugins/lolmewnStats/lolmewnStats.php on lines 49..73
plugins/lolmewnStats/lolmewnStats.php on lines 136..160
plugins/lolmewnStats/lolmewnStats.php on lines 161..185
plugins/lolmewnStats/lolmewnStats.php on lines 186..210
plugins/lolmewnStats/lolmewnStats.php on lines 298..322
plugins/lolmewnStats/lolmewnStats.php on lines 555..579
plugins/lolmewnStats/lolmewnStats.php on lines 580..604
plugins/lolmewnStats/lolmewnStats.php on lines 648..672
plugins/lolmewnStats/lolmewnStats.php on lines 673..697
plugins/lolmewnStats/lolmewnStats.php on lines 698..722
plugins/lolmewnStats/lolmewnStats.php on lines 723..747
plugins/lolmewnStats/lolmewnStats.php on lines 767..791
plugins/lolmewnStats/lolmewnStats.php on lines 823..847
plugins/lolmewnStats/lolmewnStats.php on lines 867..891
plugins/lolmewnStats/lolmewnStats.php on lines 892..916

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

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

            "beds_entered"     => [
                "database"        => "beds_entered",
                "name"            => "Beds entered",
                "user_identifier" => "uuid",
                "text" => [
Severity: Major
Found in plugins/lolmewnStats/lolmewnStats.php and 23 other locations - About 1 hr to fix
plugins/Statz/Statz.php on lines 129..153
plugins/Statz/Statz.php on lines 154..178
plugins/Statz/Statz.php on lines 210..234
plugins/Statz/Statz.php on lines 266..290
plugins/Statz/Statz.php on lines 291..315
plugins/Statz/Statz.php on lines 639..663
plugins/Statz/Statz.php on lines 776..800
plugins/lolmewnStats/lolmewnStats.php on lines 24..48
plugins/lolmewnStats/lolmewnStats.php on lines 136..160
plugins/lolmewnStats/lolmewnStats.php on lines 161..185
plugins/lolmewnStats/lolmewnStats.php on lines 186..210
plugins/lolmewnStats/lolmewnStats.php on lines 273..297
plugins/lolmewnStats/lolmewnStats.php on lines 298..322
plugins/lolmewnStats/lolmewnStats.php on lines 555..579
plugins/lolmewnStats/lolmewnStats.php on lines 580..604
plugins/lolmewnStats/lolmewnStats.php on lines 648..672
plugins/lolmewnStats/lolmewnStats.php on lines 673..697
plugins/lolmewnStats/lolmewnStats.php on lines 698..722
plugins/lolmewnStats/lolmewnStats.php on lines 723..747
plugins/lolmewnStats/lolmewnStats.php on lines 767..791
plugins/lolmewnStats/lolmewnStats.php on lines 823..847
plugins/lolmewnStats/lolmewnStats.php on lines 867..891
plugins/lolmewnStats/lolmewnStats.php on lines 892..916

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

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 renderPie () {
        $values = [];
        foreach ($this->labels as $label) {
            array_push($values, $this->data[$label]);
        }
Severity: Minor
Found in classes/chart.class.php and 1 other location - About 40 mins to fix
classes/chart.class.php on lines 55..73

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

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 renderBar () {
        $values = [];
        foreach ($this->labels as $label) {
            array_push($values, $this->data[$label]);
        }
Severity: Minor
Found in classes/chart.class.php and 1 other location - About 40 mins to fix
classes/chart.class.php on lines 75..93

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

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