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);
- Read upRead up
- Exclude checks
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");
}
- Read upRead up
- Exclude checks
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 {
- Read upRead up
- Exclude checks
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();
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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");
}
- Read upRead up
- Exclude checks
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);
}
- Read upRead up
- Exclude checks
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");
}
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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
- Exclude checks
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);
- Exclude checks
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");
}
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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");
}
- Exclude checks
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();
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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;
}
- Exclude checks
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");
}
- Read upRead up
- Exclude checks
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
}
}