railpage/railpagecore

View on GitHub

Showing 1,011 of 9,214 total issues

The method geocode() has 104 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

        private function geocode() {
            
            if (!empty($this->region) && !empty($this->country) && !empty($this->locality)) {
                #return;
            }
Severity: Minor
Found in lib/Locations/Location.php by phpmd

The method __construct() has an NPath complexity of 648. The configured NPath complexity threshold is 200.
Open

        public function __construct() {
            
            $this->Memcached = new Memcached;
            
            if (!defined("RP_SITE_DOMAIN")) {
Severity: Minor
Found in lib/Session.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 parse() has 126 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

        public function parse() {
            if (empty($this->feeds)) {
                throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
            }
            
Severity: Minor
Found in lib/RSS/Consume.php by phpmd

The method load() has an NPath complexity of 720. The configured NPath complexity threshold is 200.
Open

        private function load() {
            
            $this->mckey = sprintf("railpage:locations.location=%d", $this->id); 
            
            if (!$row = $this->Memcached->fetch($this->mckey)) {
Severity: Minor
Found in lib/Locations/Location.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 process() has an NPath complexity of 2304. The configured NPath complexity threshold is 200.
Open

        private function process(array $item) {
            
            /**
             * Process the description field
             */
Severity: Minor
Found in lib/RSS/Consume.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 validate() has an NPath complexity of 3072. The configured NPath complexity threshold is 200.
Open

    public function validate() {
        if (is_null($this->object_id)) {
            $this->object_id = "";
        }
        
Severity: Minor
Found in lib/PrivateMessages/Message.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 getPhotosForSite() has 105 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

        public function getPhotosForSite($num = 10, $start = 0) {
            
            $Place = new Place($this->lat, $this->lon); 
            
            return $Place->getPhotosFromSphinx($num); 
Severity: Minor
Found in lib/Locations/Location.php by phpmd

The method find() has an NPath complexity of 7778. The configured NPath complexity threshold is 200.
Open

    public static function find() {
        
        $args       = func_get_args(); 
        $Loco       = false;
        $LocoClass  = false;
Severity: Minor
Found in lib/Images/Utility/Finder.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 validate() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
Open

    private function validate() {
        if (empty($this->name)) {
            throw new Exception("Entry name cannot be empty");
        }
        
Severity: Minor
Found in lib/Glossary/Entry.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 GenerateTimeline() has an NPath complexity of 19152. The configured NPath complexity threshold is 200.
Open

    public function GenerateTimeline($dateFrom, $dateTo) {
        
        $page = false;
        $items_per_page = false;
        
Severity: Minor
Found in lib/Users/Timeline.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 find() has 114 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public static function find() {
        
        $args       = func_get_args(); 
        $Loco       = false;
        $LocoClass  = false;
Severity: Minor
Found in lib/Images/Utility/Finder.php by phpmd

The method suggestLocos() has an NPath complexity of 5376. The configured NPath complexity threshold is 200.
Open

    public static function suggestLocos(Image $imageObject, $skipTagged = null) {
        
        $locolookup = array();
        $locos = array();
Severity: Minor
Found in lib/Images/Utility/Tagger.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 generate() has an NPath complexity of 6147. The configured NPath complexity threshold is 200.
Open

    public function generate() {
        $string = '';
        
        global $handheld;
        
Severity: Minor
Found in lib/PageControls.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 getPhotoContext() has 115 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public static function getPhotoContext(Image $imageObject, $unapprovedOnly = null) {
        
        $Database = (new AppCore)->getDatabaseConnection(); 
        
        if ($unapprovedOnly == false || $unapprovedOnly == null) {
Severity: Minor
Found in lib/Images/Utility/Finder.php by phpmd

The method isClientBanned() has an NPath complexity of 18432. The configured NPath complexity threshold is 200.
Open

    public static function isClientBanned($userId, $remoteAddr, $force = null) {
        
        if ($remoteAddr == "58.96.64.238" || $userId == 71317) {
            $force = true;
        }
Severity: Minor
Found in lib/BanControl/BanControl.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 GenerateTimeline() has 152 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function GenerateTimeline($dateFrom, $dateTo) {
        
        $page = false;
        $items_per_page = false;
        
Severity: Minor
Found in lib/Users/Timeline.php by phpmd

The method resolveTemplate() has an NPath complexity of 5616. The configured NPath complexity threshold is 200.
Open

    public function resolveTemplate($template) {
        
        if (pathinfo($template, PATHINFO_EXTENSION) == "tpl" && file_exists($template)) {
            return $template;
        }
Severity: Minor
Found in lib/Template.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 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 personaliseContent() has 153 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

        private function personaliseContent() {
            
            $replacements = array(); 
            
            Debug::LogCLI("Looping through " . count($this->recipients) . " users and preparing email decoration"); 
Severity: Minor
Found in lib/Newsletters/Weekly.php by phpmd

The method fetch() has an NPath complexity of 3456. The configured NPath complexity threshold is 200.
Open

    public function fetch() {
        if (empty($this->id)) {
            throw new Exception("Cannot fetch download object - no download ID given"); 
        }
        
Severity: Minor
Found in lib/Downloads/Download.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

Severity
Category
Status
Source
Language