railpage/railpagecore

View on GitHub

Showing 1,011 of 9,214 total issues

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

        private function validate() {
            if (!filter_var($this->transport, FILTER_VALIDATE_INT)) {
                $this->transport = Notifications::TRANSPORT_EMAIL;
            }
            
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 validate() has an NPath complexity of 5184. The configured NPath complexity threshold is 200.
Open

    public function validate() {
        if (!is_object($this->Organisation) || empty($this->Organisation->id)) {
            throw new Exception("Cannot save job - organisation is empty or invalid"); 
            return false;
        }
Severity: Minor
Found in lib/Jobs/Job.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 getWeatherForecast() has an NPath complexity of 10368. The configured NPath complexity threshold is 200.
Open

    public function getWeatherForecast($days = 14) {
        
        return false;
        
        $weather = false;
Severity: Minor
Found in lib/Place.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 an NPath complexity of 36864. The configured NPath complexity threshold is 200.
Open

    public static function getWOEData($lookup = false, $types = false) {
        if ($lookup === false) {
            return false;
        }
        
Severity: Minor
Found in lib/Place.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 class Article has 1149 lines of code. Current threshold is 1000. Avoid really long classes.
Open

    class Article extends Base {
        
        /**
         * Cache key to store and fetch the formatted lead text from the cache
         * @since Version 3.10.0
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 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 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 createSlug() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
Open

        public function createSlug($story_id = false) {
            if (RP_DEBUG) {
                global $site_debug;
                $debug_timer_start = microtime(true);
            }
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 setPushSubscription() has an NPath complexity of 336. The configured NPath complexity threshold is 200.
Open

        public static function setPushSubscription(User $User, $subscription, $enabled = null) {
            
            $endpoint = false;
            $registration_id = false;
            $provider = false;
Severity: Minor
Found in lib/Notifications/Notifications.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 send() has an NPath complexity of 288. The configured NPath complexity threshold is 200.
Open

        public function send() {
            
            $this->validate();
            
            $from_email = $this->data['author']['username'] == "Railpage System User" ? $this->Config->SMTP->username : $this->data['author']['email'];
Severity: Minor
Found in lib/Notifications/Transport/Email.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 formatExif() has an NPath complexity of 320. The configured NPath complexity threshold is 200.
Open

    public function formatExif($exif) {
        
        $format = array();
        
        // Aperture
Severity: Minor
Found in lib/Images/Exif.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 commit() has an NPath complexity of 638976. The configured NPath complexity threshold is 200.
Open

        public function commit() {

            $this->validate();

            if (function_exists("prepare_submit")) {
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 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 validatePassword() has an NPath complexity of 2340. The configured NPath complexity threshold is 200.
Open

    public function validatePassword($password = false, $username = false) {
        
        Utility\PasswordUtility::validateParameters($password, $username, $this); 

        /**
Severity: Minor
Found in lib/Users/User.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 validatePassword() has 110 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function validatePassword($password = false, $username = false) {
        
        Utility\PasswordUtility::validateParameters($password, $username, $this); 

        /**
Severity: Minor
Found in lib/Users/User.php by phpmd

The method getCategories() has an NPath complexity of 480. The configured NPath complexity threshold is 200.
Open

    public function getCategories($parent = 0, $children = true) {
        $parent = intval($parent);
        
        $mckey = "railpage:links.categories.parent=" . $parent . ".children=" . (bool)$children; 
        
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 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

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

Severity
Category
Status
Source
Language