railpage/railpagecore

View on GitHub

Showing 1,011 of 9,214 total issues

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

    private function load($option = null) {

        Debug::RecordInstance();

        $this->mckey = sprintf("railpage:image=%d", $this->id);
Severity: Minor
Found in lib/Images/Image.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 497664. The configured NPath complexity threshold is 200.
Open

        public function validate() {
            if (empty( $this->title )) {
                throw new Exception("Validation failed: title is empty");
            }
Severity: Minor
Found in lib/News/Article.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 makeJSON() has an NPath complexity of 512. The configured NPath complexity threshold is 200.
Open

        public function makeJSON() {

            if ($this->date instanceof DateTime) {
                $timezone = $this->date->getTimezone();
            } else {
Severity: Minor
Found in lib/News/Article.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 filter() has an NPath complexity of 1920. The configured NPath complexity threshold is 200.
Open

    public function filter($args) {

        if ($args === false) {
            $args = array();
        }
Severity: Minor
Found in lib/Jobs/Jobs.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 getWinningPhoto() has an NPath complexity of 216. The configured NPath complexity threshold is 200.
Open

    public function getWinningPhoto() {
        
        if ($this->VotingDateClose >= new DateTime) {
            return false;
        }
Severity: Minor
Found in lib/Images/Competition.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 populate() has an NPath complexity of 293129856. The configured NPath complexity threshold is 200.
Open

    public function populate($force = false, $option = null) {

        if ($force === false && !$this->isStale()) {
            return $this;
        }
Severity: Minor
Found in lib/Images/Image.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 findObjects() has an NPath complexity of 1552. The configured NPath complexity threshold is 200.
Open

    public function findObjects($namespace = null, $force = false) {

        if (is_null($namespace)) {
            throw new Exception("Parameter 1 (namespace) cannot be empty");
        }
Severity: Minor
Found in lib/Images/Image.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 createSlug() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
Open

    public function createSlug($categoryId = false) {
        if (RP_DEBUG) {
            global $site_debug;
            $debug_timer_start = microtime(true);
        }
Severity: Minor
Found in lib/Links/Links.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 82944. The configured NPath complexity threshold is 200.
Open

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

        public function mostReadThisWeek($limit = 5) {
            $return = false;
            
            $params = array(); 
            
Severity: Minor
Found in lib/News/Base.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 getArray() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
Open

        public function getArray() {
            $array = array(
                "id" => $this->id,
                "subject" => $this->subject,
                "body" => $this->body,
Severity: Minor
Found in lib/Notifications/Notification.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 class Competition has 1219 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class Competition extends AppCore {
    
    /**
     * Registry key
     * @since Version 3.10.0
Severity: Minor
Found in lib/Images/Competition.php by phpmd

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

    public function getRoutes() {
        
        $params = array("line");
        
        $results = $this->fetch("search", $params);
Severity: Minor
Found in lib/GTFS/AU/VIC/PTV/PTV.php by phpmd

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

        public function fetch() {
            if (!is_string($this->feed)) {
                throw new Exception("Cannot fetch news articles from RSS feed because no RSS feed was provided");
            }
            
Severity: Minor
Found in lib/News/Scraper.php by phpmd

The method populate() has an NPath complexity of 240. The configured NPath complexity threshold is 200.
Open

    private function populate($id) {
        
        $row = $this->load($id); 
        
        if (!isset($row) || !is_array($row)) {
Severity: Minor
Found in lib/Events/Event.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 findObjects() has 121 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function findObjects($namespace = null, $force = false) {

        if (is_null($namespace)) {
            throw new Exception("Parameter 1 (namespace) cannot be empty");
        }
Severity: Minor
Found in lib/Images/Image.php by phpmd

The method commit() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
Open

    public function commit() {
        $this->validate();
        
        $timer = Debug::getTimer();
        
Severity: Minor
Found in lib/Locos/LocoClass.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 setUserFavourite() has an NPath complexity of 480. The configured NPath complexity threshold is 200.
Open

    public function setUserFavourite() {
        
        /**
         * Because I'll no doubt get confused - frequently - at the order of parameters, 
         * let's just be a sneaky bastard and check each parameter
Severity: Minor
Found in lib/Images/Favourites.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 fetch() has 114 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

        public function fetch($id = false) {
            if ($id) {
                $this->id = $id;
            }
Severity: Minor
Found in lib/News/Article.php by phpmd

The method bulkAddLocos() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
Open

    public function bulkAddLocos($firstLoco = null, $lastLoco = null, $gaugeId = null, $statusId = null, $manufacturerId = null, $prefix = "") {
        if ($firstLoco == null) {
            throw new Exception("Cannot add locomotives to class - first loco number was not provided");
        }
        
Severity: Minor
Found in lib/Locos/LocoClass.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