railpage/railpagecore

View on GitHub
lib/Images/PhotoOfTheWeek.php

Summary

Maintainability
D
2 days
Test Coverage

Function NominateImage has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public function NominateImage(Image $imageObject, DateTime $dateWeek, User $userObject) {
        
        $query = "SELECT id FROM image_weekly WHERE datefrom = ?";
        
        if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
Severity: Minor
Found in lib/Images/PhotoOfTheWeek.php - About 2 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Method NominateImage has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function NominateImage(Image $imageObject, DateTime $dateWeek, User $userObject) {
        
        $query = "SELECT id FROM image_weekly WHERE datefrom = ?";
        
        if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
Severity: Minor
Found in lib/Images/PhotoOfTheWeek.php - About 1 hr to fix

    The method NominateImage() has an NPath complexity of 1040. The configured NPath complexity threshold is 200.
    Open

        public function NominateImage(Image $imageObject, DateTime $dateWeek, User $userObject) {
            
            $query = "SELECT id FROM image_weekly WHERE datefrom = ?";
            
            if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.php by phpmd

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

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

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

        public function NominateImage(Image $imageObject, DateTime $dateWeek, User $userObject) {
            
            $query = "SELECT id FROM image_weekly WHERE datefrom = ?";
            
            if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.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

    The method getStartOfWeek has a boolean flag argument $week, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public static function getStartOfWeek($week = false) {
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getImageOfTheWeek has a boolean flag argument $week, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getImageOfTheWeek($week = false) {
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

        public function isPhotoOfTheWeek(Image $imageObject) {
            
            $query = "SELECT iw.datefrom, u.user_id, u.username, iw.image_id 
                FROM image_weekly AS iw 
                LEFT JOIN nuke_users AS u ON iw.added_by = u.user_id
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 1 other location - About 1 hr to fix
    lib/Images/Screener.php on lines 165..172

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 42..44
    lib/Images/PhotoOfTheWeek.php on lines 46..48
    lib/Images/PhotoOfTheWeek.php on lines 54..56
    lib/Images/PhotoOfTheWeek.php on lines 58..60
    lib/Images/PhotoOfTheWeek.php on lines 62..64

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 42..44
    lib/Images/PhotoOfTheWeek.php on lines 46..48
    lib/Images/PhotoOfTheWeek.php on lines 50..52
    lib/Images/PhotoOfTheWeek.php on lines 54..56
    lib/Images/PhotoOfTheWeek.php on lines 58..60

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 46..48
    lib/Images/PhotoOfTheWeek.php on lines 50..52
    lib/Images/PhotoOfTheWeek.php on lines 54..56
    lib/Images/PhotoOfTheWeek.php on lines 58..60
    lib/Images/PhotoOfTheWeek.php on lines 62..64

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 42..44
    lib/Images/PhotoOfTheWeek.php on lines 46..48
    lib/Images/PhotoOfTheWeek.php on lines 50..52
    lib/Images/PhotoOfTheWeek.php on lines 58..60
    lib/Images/PhotoOfTheWeek.php on lines 62..64

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 42..44
    lib/Images/PhotoOfTheWeek.php on lines 46..48
    lib/Images/PhotoOfTheWeek.php on lines 50..52
    lib/Images/PhotoOfTheWeek.php on lines 54..56
    lib/Images/PhotoOfTheWeek.php on lines 62..64

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
                    $dateWeek->add(new DateInterval("P7D"));
                }
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 5 other locations - About 1 hr to fix
    lib/Images/PhotoOfTheWeek.php on lines 42..44
    lib/Images/PhotoOfTheWeek.php on lines 50..52
    lib/Images/PhotoOfTheWeek.php on lines 54..56
    lib/Images/PhotoOfTheWeek.php on lines 58..60
    lib/Images/PhotoOfTheWeek.php on lines 62..64

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

    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

                    $Message->body = sprintf("Your [url=%s]photo[/url] has been nominated for Photo of the Week. \n\nRegards,\n%s\n\nThis is an automated message.", $imageObject->url, $userObject->username);
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 2 other locations - About 45 mins to fix
    lib/Images/Utility/PushNotify.php on lines 48..48
    lib/Place.php on lines 104..104

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

    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

            $result['url'] = Utility\Url::CreateFromImageID($result['id'])->getURLs();
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 3 other locations - About 45 mins to fix
    lib/Images/Favourites.php on lines 72..72
    lib/Images/PhotoOfTheWeek.php on lines 215..215
    lib/Images/Utility/Finder.php on lines 648..648

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

    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

                $row['url'] = Utility\Url::CreateFromImageID($row['id'])->getURLs();
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 3 other locations - About 45 mins to fix
    lib/Images/Favourites.php on lines 72..72
    lib/Images/PhotoOfTheWeek.php on lines 153..153
    lib/Images/Utility/Finder.php on lines 648..648

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

    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 NominateImage(Image $imageObject, DateTime $dateWeek, User $userObject) {
            
            $query = "SELECT id FROM image_weekly WHERE datefrom = ?";
            
            if ($this->db->fetchOne($query, $dateWeek->format("Y-m-d"))) {
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.php and 1 other location - About 35 mins to fix
    lib/Images/Utility/PushNotify.php on lines 44..58

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

    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

                if (isset($imageObject->author->User) && $imageObject->author->User instanceof User) {
                    $Message = new Message;
                    $Message->setAuthor($userObject);
                    $Message->setRecipient($imageObject->author->User);
                    $Message->subject = "Photo of the Week";
    Severity: Major
    Found in lib/Images/PhotoOfTheWeek.php and 3 other locations - About 30 mins to fix
    lib/Images/Image.php on lines 464..464
    lib/Locos/Correction.php on lines 255..255
    lib/Locos/Correction.php on lines 256..256

    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

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

            $ts = strtotime('sunday last week', $week->getTimestamp()); 
    Severity: Minor
    Found in lib/Images/PhotoOfTheWeek.php and 1 other location - About 30 mins to fix
    lib/News/Article.php on lines 408..408

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

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

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

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

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

    Refactorings

    Further Reading

    Function 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

        }

    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