railpage/railpagecore

View on GitHub

Showing 1,011 of 9,214 total issues

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

    public function commit() {
        
        $this->validate(); 
        
        $data = array(
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 getImageFromUrl() has an NPath complexity of 378. The configured NPath complexity threshold is 200.
Open

    public function getImageFromUrl($url = null, $option = null) {
        
        /**
         * Flickr
         */
Severity: Minor
Found in lib/Images/Images.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 an NPath complexity of 1152. The configured NPath complexity threshold is 200.
Open

    public function fetch($method = null, $parameters = array(), $other = array()) {
        if ($method == null && empty($parameters)) {
            throw new Exception("Cannot fetch API query - no API method defined");
        }
        
Severity: Minor
Found in lib/GTFS/AU/VIC/PTV/PTV.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 guessTopic() has an NPath complexity of 1024. The configured NPath complexity threshold is 200.
Open

        static public function guessTopic($topic) {
            
            /**
             * Normalise the topic name
             */
Severity: Minor
Found in lib/News/News.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 getWOEData() has 153 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public static function getWOEData($lookup = false, $types = false) {
        if ($lookup === false) {
            return false;
        }
        
Severity: Minor
Found in lib/Place.php by phpmd

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 cacheGeoData() has an NPath complexity of 216. The configured NPath complexity threshold is 200.
Open

    private function cacheGeoData() {

        if (!$this->Place instanceof Place) {
            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 load() has 104 lines of code. Current threshold is set to 100. Avoid really long methods.
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

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 class Image has 1505 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class Image extends AppCore {

    /**
     * Max age of data before it requires refreshing
     */
Severity: Minor
Found in lib/Images/Image.php by phpmd

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 method canUserVote() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
Open

    public function canUserVote(User $userObject, $imageObject = null) {
        if (!filter_var($userObject->id, FILTER_VALIDATE_INT)) {
            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 __construct() has 124 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function __construct() {
        global $ZendDB, $ZendDB_ReadOnly, $PHPUnitTest;
        
        /**
         * Create the registry
Severity: Minor
Found in lib/AppCore.php by phpmd

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 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 fetch() has an NPath complexity of 9216. The configured NPath complexity threshold is 200.
Open

    private function fetch($recurse) {
        
        if (!filter_var($this->id, FILTER_VALIDATE_INT)) {
            $this->id = Utility\LocomotiveUtility::getClassId($this->id); 
        }
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 format() has 141 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public static function format($userAvatar = null, $width = 100, $height = 100) {
        if (is_null($userAvatar)) {
            return false;
        }
        
Severity: Minor
Found in lib/Users/Utility/AvatarUtility.php by phpmd

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 fetchOld() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function fetchOld() {

        if (!is_string($this->feed)) {
            throw new Exception("Cannot fetch jobs from RSS feed because no RSS feed was provided");
        }
Severity: Minor
Found in lib/Jobs/Scraper.php by phpmd
Severity
Category
Status
Source
Language