railpage/railpagecore

View on GitHub

Showing 1,011 of 9,214 total issues

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

    public function generateCalendar() {
        
        /**
         * Load the Events class for later on
         */
Severity: Minor
Found in lib/Events/Month.php by phpmd

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

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

    public static function relativeTime($timestamp, $now = null, $format = null) {
        
        if ($timestamp instanceof DateTime) {
            $timestamp = $timestamp->getTimestamp(); 
        }
Severity: Minor
Found in lib/ContentUtility.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 157 lines of code. Current threshold is set to 100. Avoid really long methods.
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

The class Locomotive has 1518 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class Locomotive extends Locos {
    
    /**
     * Registry cache key
     * @since Version 3.9.1
Severity: Minor
Found in lib/Locos/Locomotive.php by phpmd

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

    private function validate() {
        
        if ($this->class instanceof LocoClass && !$this->Class instanceof LocoClass) {
            $this->Class = &$this->class;
        }
Severity: Minor
Found in lib/Locos/Locomotive.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 getCoverImageOfObject() has an NPath complexity of 2304. The configured NPath complexity threshold is 200.
Open

    public static function getCoverImageOfObject($Object) {
        
        if (!self::hasCoverImage($Object)) {
            return false;
        }

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 an NPath complexity of 3024. The configured NPath complexity threshold is 200.
Open

    public function __construct($id = NULL) {
        parent::__construct(); 
        
        $this->Module = new Module("events");
        $this->namespace = $this->Module->namespace;
Severity: Minor
Found in lib/Events/EventDate.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 createOtherSizes() has 161 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public static function createOtherSizes() {
        
        $sleep = 2; 
        $sleep = false;
        
Severity: Minor
Found in lib/Gallery/Utility/CreateSizes.php by phpmd

The class Locos has 1153 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class Locos extends AppCore {
    
    /**
     * Status : Operational
     * @since Version 3.8.7
Severity: Minor
Found in lib/Locos/Locos.php by phpmd

The class LocoClass has 1243 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class LocoClass extends Locos {
    
    /**
     * Registry cache key
     * @since Version 3.9.1
Severity: Minor
Found in lib/Locos/LocoClass.php by phpmd

The class Forums has 1171 lines of code. Current threshold is 1000. Avoid really long classes.
Open

class Forums extends AppCore {
    
    /**
     * Auth: list all
     * @const AUTH_LIST_ALL
Severity: Minor
Found in lib/Forums/Forums.php by phpmd

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

    public function latestPosts($is_auth_ary, $since, $limit = 10) {
        if (empty($is_auth_ary) || !is_array($is_auth_ary)) {
            return false;
        }
        
Severity: Minor
Found in lib/Forums/Forums.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 buildACL() has 210 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function buildACL($force = false) {
        
        $Registry = Registry::getInstance(); 
        
        try {
Severity: Minor
Found in lib/Forums/Forums.php by phpmd

The method findFromTags() has an NPath complexity of 2754. The configured NPath complexity threshold is 200.
Open

    private function findFromTags($tags) {
        if (!is_array($tags)) {
            $tags = array($tags);
        }
        
Severity: Minor
Found in lib/Locos/Maintainers/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 createOtherSizes() has an NPath complexity of 1545. The configured NPath complexity threshold is 200.
Open

    public static function createOtherSizes() {
        
        $sleep = 2; 
        $sleep = false;
        
Severity: Minor
Found in lib/Gallery/Utility/CreateSizes.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 getReadItemsForUser() has an NPath complexity of 240. The configured NPath complexity threshold is 200.
Open

    public static function getReadItemsForUser(User $User, $type = "t") {
        
        /**
         * Not logged in - no threads/forums
         */
Severity: Minor
Found in lib/Forums/Forums.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 152 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function commit() {
        if (empty($this->bbcode_uid)) {
            $this->bbcode_uid = crc32($this->text);
        }
        
Severity: Minor
Found in lib/Forums/Post.php by phpmd

The method buildACL() has an NPath complexity of 27792. The configured NPath complexity threshold is 200.
Open

    public function buildACL($force = false) {
        
        $Registry = Registry::getInstance(); 
        
        try {
Severity: Minor
Found in lib/Forums/Forums.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