eveseat/notifications

View on GitHub

Showing 405 of 405 total issues

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

        return (new SlackMessage)
            ->from('SeAT War Observer')
            ->content('A war has been invalidated!')
            ->attachment(function ($attachment) {
                $attachment
Severity: Major
Found in src/Notifications/Wars/Slack/AllWarInvalidatedMsg.php and 1 other location - About 1 day to fix
src/Notifications/Wars/Slack/AllWarDeclaredMsg.php on lines 67..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 249.

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

        $message = (new SlackMessage())
            ->from('SeAT War Observer')
            ->content('A new War has been declared !')
            ->attachment(function ($attachment) {
                $attachment
Severity: Major
Found in src/Notifications/Wars/Slack/AllWarDeclaredMsg.php and 1 other location - About 1 day to fix
src/Notifications/Wars/Slack/AllWarInvalidatedMsg.php on lines 67..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 249.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Notifications/Starbases/Slack/StarbaseSiphons.php and 1 other location - About 7 hrs to fix
src/Notifications/Starbases/Slack/StarbaseStateChange.php on lines 1..107

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

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Notifications/Starbases/Slack/StarbaseStateChange.php and 1 other location - About 7 hrs to fix
src/Notifications/Starbases/Slack/StarbaseSiphons.php on lines 1..107

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

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/zh-CN/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/ro/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/fr/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/af/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/ko/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/ja/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/de/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/en/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/ru/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/resources/lang/ru/alerts.php and 8 other locations - About 5 hrs to fix
src/resources/lang/af/alerts.php on lines 1..66
src/resources/lang/de/alerts.php on lines 1..66
src/resources/lang/en/alerts.php on lines 1..66
src/resources/lang/fr/alerts.php on lines 1..66
src/resources/lang/ja/alerts.php on lines 1..66
src/resources/lang/ko/alerts.php on lines 1..66
src/resources/lang/ro/alerts.php on lines 1..66
src/resources/lang/zh-CN/alerts.php on lines 1..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 190.

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Notifications/Seat/Slack/SquadMemberNotification.php and 1 other location - About 4 hrs to fix
src/Notifications/Seat/Slack/SquadMemberRemovedNotification.php on lines 1..95

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

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

<?php

/*
 * This file is part of SeAT
 *
src/Notifications/Seat/Slack/SquadMemberNotification.php on lines 1..95

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

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

        return (new SlackMessage)
            ->content('A structure is anchoring!')
            ->from('SeAT Structure Monitor')
            ->attachment(function ($attachment) {
                $attachment
Severity: Major
Found in src/Notifications/Structures/Slack/AllAnchoringMsg.php and 1 other location - About 4 hrs to fix
src/Notifications/Sovereignties/Slack/SovStructureDestroyed.php on lines 66..91

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

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

        return (new SlackMessage)
            ->content('A sovereignty structure has been destroyed!')
            ->from('SeAT Sovereignty Health')
            ->attachment(function ($attachment) {

src/Notifications/Structures/Slack/AllAnchoringMsg.php on lines 72..119

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

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Notifications/Seat/Slack/EnabledToken.php and 1 other location - About 4 hrs to fix
src/Notifications/Seat/Slack/DisabledToken.php on lines 1..87

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

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

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Notifications/Seat/Slack/DisabledToken.php and 1 other location - About 4 hrs to fix
src/Notifications/Seat/Slack/EnabledToken.php on lines 1..87

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

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 toSlack has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function toSlack($notifiable)
    {
        return (new SlackMessage)
            ->content('A structure is under attack!')
            ->from('SeAT Structure Monitor')
Severity: Major
Found in src/Notifications/Structures/Slack/StructureUnderAttack.php - About 2 hrs to fix
    Severity
    Category
    Status
    Source
    Language