railpage/railpagecore

View on GitHub
lib/Feedback/FeedbackItem.php

Summary

Maintainability
C
1 day
Test Coverage

Method __construct has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct($id = null) {
        parent::__construct(); 
        
        if (!filter_var($id, FILTER_VALIDATE_INT)) {
            return;
Severity: Minor
Found in lib/Feedback/FeedbackItem.php - About 1 hr to fix

    Function validate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        private function validate() {
            
            if (!$this->Date instanceof DateTime && empty($this->Date)) {
                $this->Date = new DateTime;
            }
    Severity: Minor
    Found in lib/Feedback/FeedbackItem.php - About 1 hr 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

    The method validate() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
    Open

        private function validate() {
            
            if (!$this->Date instanceof DateTime && empty($this->Date)) {
                $this->Date = new DateTime;
            }
    Severity: Minor
    Found in lib/Feedback/FeedbackItem.php by phpmd

    CyclomaticComplexity

    Since: 0.1

    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

    Example

    // Cyclomatic Complexity = 11
    class Foo {
    1   public function example() {
    2       if ($a == $b) {
    3           if ($a1 == $b1) {
                    fiddle();
    4           } elseif ($a2 == $b2) {
                    fiddle();
                } else {
                    fiddle();
                }
    5       } elseif ($c == $d) {
    6           while ($c == $d) {
                    fiddle();
                }
    7        } elseif ($e == $f) {
    8           for ($n = 0; $n < $h; $n++) {
                    fiddle();
                }
            } else {
                switch ($z) {
    9               case 1:
                        fiddle();
                        break;
    10              case 2:
                        fiddle();
                        break;
    11              case 3:
                        fiddle();
                        break;
                    default:
                        fiddle();
                        break;
                }
            }
        }
    }

    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

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

            if (!filter_var($this->status_id, FILTER_VALIDATE_INT)) {
                $this->status_id = 1;
            }
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 11 other locations - About 1 hr to fix
    lib/Downloads/Download.php on lines 297..299
    lib/Downloads/Download.php on lines 301..303
    lib/Downloads/Download.php on lines 305..307
    lib/Forums/Category.php on lines 166..168
    lib/Gallery/Image.php on lines 334..336
    lib/Ideas/Idea.php on lines 268..270
    lib/Ideas/Idea.php on lines 272..274
    lib/Locations/Location.php on lines 440..442
    lib/Locations/Location.php on lines 452..454
    lib/Locos/Operator.php on lines 129..131
    lib/Users/User.php on lines 1208..1210

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

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

            $this->url = new Url(sprintf("/feedback/manage/%d", $this->id));
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 9 other locations - About 55 mins to fix
    lib/Content/Page.php on lines 154..154
    lib/Downloads/Category.php on lines 101..101
    lib/Downloads/Category.php on lines 183..183
    lib/Forums/Thread.php on lines 236..236
    lib/Forums/Thread.php on lines 358..358
    lib/Images/Camera.php on lines 130..130
    lib/Locos/Manufacturer.php on lines 114..114
    lib/Locos/Manufacturer.php on lines 143..143
    lib/Locos/Operator.php on lines 113..113

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

    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

            $this->Date         = new DateTime("@" . $row['time']);
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 2 other locations - About 40 mins to fix
    lib/Gallery/Image.php on lines 174..174
    lib/Warnings/Warning.php on lines 135..135

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

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

                $this->Author->username = sprintf("%s (guest)", $this->email);
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 30 other locations - About 40 mins to fix
    lib/Content/Page.php on lines 155..155
    lib/Events/EventDate.php on lines 161..161
    lib/Feedback/FeedbackItem.php on lines 147..147
    lib/Feedback/FeedbackItem.php on lines 148..148
    lib/Feedback/FeedbackItem.php on lines 155..155
    lib/Forums/Post.php on lines 749..749
    lib/Forums/Post.php on lines 750..750
    lib/Forums/Post.php on lines 751..751
    lib/Forums/Post.php on lines 752..752
    lib/Forums/Post.php on lines 753..753
    lib/Forums/Post.php on lines 754..754
    lib/Forums/Post.php on lines 755..755
    lib/Forums/Post.php on lines 756..756
    lib/Ideas/Idea.php on lines 207..207
    lib/Images/Camera.php on lines 131..131
    lib/Images/Competition.php on lines 431..431
    lib/Locos/Operator.php on lines 114..114
    lib/Locos/Operator.php on lines 115..115
    lib/News/Article.php on lines 481..481
    lib/News/Article.php on lines 482..482
    lib/News/Article.php on lines 483..483
    lib/News/Article.php on lines 484..484
    lib/News/Article.php on lines 485..485
    lib/Newsletters/Newsletter.php on lines 267..267
    lib/Newsletters/Newsletter.php on lines 268..268
    lib/Newsletters/Newsletter.php on lines 269..269
    lib/Newsletters/Newsletter.php on lines 270..270
    lib/Reminders/Reminder.php on lines 165..165
    lib/SiteMessages/SiteMessage.php on lines 193..193
    lib/SiteMessages/SiteMessage.php on lines 194..194

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

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

                $this->Author->url = sprintf("/user?mode=lookup&email=%s", $this->email);
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 30 other locations - About 40 mins to fix
    lib/Content/Page.php on lines 155..155
    lib/Events/EventDate.php on lines 161..161
    lib/Feedback/FeedbackItem.php on lines 147..147
    lib/Feedback/FeedbackItem.php on lines 148..148
    lib/Feedback/FeedbackItem.php on lines 154..154
    lib/Forums/Post.php on lines 749..749
    lib/Forums/Post.php on lines 750..750
    lib/Forums/Post.php on lines 751..751
    lib/Forums/Post.php on lines 752..752
    lib/Forums/Post.php on lines 753..753
    lib/Forums/Post.php on lines 754..754
    lib/Forums/Post.php on lines 755..755
    lib/Forums/Post.php on lines 756..756
    lib/Ideas/Idea.php on lines 207..207
    lib/Images/Camera.php on lines 131..131
    lib/Images/Competition.php on lines 431..431
    lib/Locos/Operator.php on lines 114..114
    lib/Locos/Operator.php on lines 115..115
    lib/News/Article.php on lines 481..481
    lib/News/Article.php on lines 482..482
    lib/News/Article.php on lines 483..483
    lib/News/Article.php on lines 484..484
    lib/News/Article.php on lines 485..485
    lib/Newsletters/Newsletter.php on lines 267..267
    lib/Newsletters/Newsletter.php on lines 268..268
    lib/Newsletters/Newsletter.php on lines 269..269
    lib/Newsletters/Newsletter.php on lines 270..270
    lib/Reminders/Reminder.php on lines 165..165
    lib/SiteMessages/SiteMessage.php on lines 193..193
    lib/SiteMessages/SiteMessage.php on lines 194..194

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

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

                $this->url->replyemail = sprintf("/feedback/email/%d", $this->id);
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 30 other locations - About 40 mins to fix
    lib/Content/Page.php on lines 155..155
    lib/Events/EventDate.php on lines 161..161
    lib/Feedback/FeedbackItem.php on lines 147..147
    lib/Feedback/FeedbackItem.php on lines 154..154
    lib/Feedback/FeedbackItem.php on lines 155..155
    lib/Forums/Post.php on lines 749..749
    lib/Forums/Post.php on lines 750..750
    lib/Forums/Post.php on lines 751..751
    lib/Forums/Post.php on lines 752..752
    lib/Forums/Post.php on lines 753..753
    lib/Forums/Post.php on lines 754..754
    lib/Forums/Post.php on lines 755..755
    lib/Forums/Post.php on lines 756..756
    lib/Ideas/Idea.php on lines 207..207
    lib/Images/Camera.php on lines 131..131
    lib/Images/Competition.php on lines 431..431
    lib/Locos/Operator.php on lines 114..114
    lib/Locos/Operator.php on lines 115..115
    lib/News/Article.php on lines 481..481
    lib/News/Article.php on lines 482..482
    lib/News/Article.php on lines 483..483
    lib/News/Article.php on lines 484..484
    lib/News/Article.php on lines 485..485
    lib/Newsletters/Newsletter.php on lines 267..267
    lib/Newsletters/Newsletter.php on lines 268..268
    lib/Newsletters/Newsletter.php on lines 269..269
    lib/Newsletters/Newsletter.php on lines 270..270
    lib/Reminders/Reminder.php on lines 165..165
    lib/SiteMessages/SiteMessage.php on lines 193..193
    lib/SiteMessages/SiteMessage.php on lines 194..194

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

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

                $this->url->replypm = sprintf("/messages/new/from/feedback-%d", $this->id);
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 30 other locations - About 40 mins to fix
    lib/Content/Page.php on lines 155..155
    lib/Events/EventDate.php on lines 161..161
    lib/Feedback/FeedbackItem.php on lines 148..148
    lib/Feedback/FeedbackItem.php on lines 154..154
    lib/Feedback/FeedbackItem.php on lines 155..155
    lib/Forums/Post.php on lines 749..749
    lib/Forums/Post.php on lines 750..750
    lib/Forums/Post.php on lines 751..751
    lib/Forums/Post.php on lines 752..752
    lib/Forums/Post.php on lines 753..753
    lib/Forums/Post.php on lines 754..754
    lib/Forums/Post.php on lines 755..755
    lib/Forums/Post.php on lines 756..756
    lib/Ideas/Idea.php on lines 207..207
    lib/Images/Camera.php on lines 131..131
    lib/Images/Competition.php on lines 431..431
    lib/Locos/Operator.php on lines 114..114
    lib/Locos/Operator.php on lines 115..115
    lib/News/Article.php on lines 481..481
    lib/News/Article.php on lines 482..482
    lib/News/Article.php on lines 483..483
    lib/News/Article.php on lines 484..484
    lib/News/Article.php on lines 485..485
    lib/Newsletters/Newsletter.php on lines 267..267
    lib/Newsletters/Newsletter.php on lines 268..268
    lib/Newsletters/Newsletter.php on lines 269..269
    lib/Newsletters/Newsletter.php on lines 270..270
    lib/Reminders/Reminder.php on lines 165..165
    lib/SiteMessages/SiteMessage.php on lines 193..193
    lib/SiteMessages/SiteMessage.php on lines 194..194

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

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

            if (is_null($this->username)) {
                $this->username = "";
            }
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 11 other locations - About 40 mins to fix
    lib/Downloads/Download.php on lines 293..295
    lib/Forums/Post.php on lines 351..353
    lib/Glossary/Entry.php on lines 262..264
    lib/Locos/Date.php on lines 266..268
    lib/Locos/WheelArrangement.php on lines 170..172
    lib/News/Article.php on lines 766..768
    lib/News/Article.php on lines 770..772
    lib/News/Article.php on lines 786..788
    lib/PrivateMessages/Message.php on lines 302..304
    lib/Sightings/Sighting.php on lines 239..241
    lib/Sightings/Sighting.php on lines 243..245

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

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

            if (is_null($this->assigned_to)) {
                $this->assigned_to = 0;
            }
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 7 other locations - About 40 mins to fix
    lib/Feedback/FeedbackItem.php on lines 172..174
    lib/Forums/Post.php on lines 355..357
    lib/Forums/Post.php on lines 359..361
    lib/Forums/Post.php on lines 363..365
    lib/Forums/Post.php on lines 367..369
    lib/Forums/Thread.php on lines 288..290
    lib/Jobs/Job.php on lines 252..254

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

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

            if (is_null($this->user_id)) {
                $this->user_id = 0;
            }
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 7 other locations - About 40 mins to fix
    lib/Feedback/FeedbackItem.php on lines 176..178
    lib/Forums/Post.php on lines 355..357
    lib/Forums/Post.php on lines 359..361
    lib/Forums/Post.php on lines 363..365
    lib/Forums/Post.php on lines 367..369
    lib/Forums/Thread.php on lines 288..290
    lib/Jobs/Job.php on lines 252..254

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

    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

            if (!filter_var($id, FILTER_VALIDATE_INT)) {
                return;
            }
    Severity: Major
    Found in lib/Feedback/FeedbackItem.php and 8 other locations - About 30 mins to fix
    lib/Chronicle/Entry.php on lines 140..142
    lib/Chronicle/EntryType.php on lines 80..82
    lib/Events/EventDate.php on lines 143..145
    lib/GTFS/StandardRoute.php on lines 68..70
    lib/GTFS/StandardStop.php on lines 97..99
    lib/Ideas/Ideas.php on lines 185..187
    lib/Images/Camera.php on lines 98..100
    lib/Users/Group.php on lines 127..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 21.

    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

    Blank line found at end of control structure
    Open

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

        }

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

        }

    There are no issues that match your filters.

    Category
    Status