Showing 1,011 of 9,214 total issues
The method validate() has an NPath complexity of 14976. The configured NPath complexity threshold is 200. Open
public function validate($ignore = false) {
if (empty( $this->username )) {
throw new Exception("Username 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 suggestLocos() has 146 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function suggestLocos(Image $imageObject, $skipTagged = null) {
$locolookup = array();
$locos = array();
- Exclude checks
The method personaliseContent() has an NPath complexity of 1921. The configured NPath complexity threshold is 200. Open
private function personaliseContent() {
$replacements = array();
Debug::LogCLI("Looping through " . count($this->recipients) . " users and preparing email decoration");
- 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 banUser() has 103 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function banUser($userId = null, $reason = null, $expiry = "0", $adminUserId = null) {
if (!filter_var($userId, FILTER_VALIDATE_INT)) {
throw new InvalidArgumentException("No user ID supplied");
}
- Exclude checks
The method banUser() has an NPath complexity of 640. The configured NPath complexity threshold is 200. Open
public function banUser($userId = null, $reason = null, $expiry = "0", $adminUserId = null) {
if (!filter_var($userId, FILTER_VALIDATE_INT)) {
throw new InvalidArgumentException("No user ID supplied");
}
- 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 512. The configured NPath complexity threshold is 200. Open
public function validate() {
if (empty($this->name)) {
throw new Exception("Verification failed - download must have a name");
}
- 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 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;
}
- Exclude checks
The method load() has an NPath complexity of 27648. The configured NPath complexity threshold is 200. Open
public function load($userId = false) {
if (filter_var($userId, FILTER_VALIDATE_INT)) {
$this->id = $userId;
}
- 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 format() has an NPath complexity of 9331200. The configured NPath complexity threshold is 200. Open
public static function format($userAvatar = null, $width = 100, $height = 100) {
if (is_null($userAvatar)) {
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 getWeatherForecast() has 140 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getWeatherForecast($days = 14) {
return false;
$weather = false;
- Exclude checks
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);
- Exclude checks
The method commit() has 109 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function commit() {
$this->validate();
if (function_exists("prepare_submit")) {
- Exclude checks
The method findArticles() has an NPath complexity of 9000. The configured NPath complexity threshold is 200. Open
public function findArticles($offset = 0, $limit = 25, $orderby = "story_time_unix") {
if (empty($this->filter_topics) || empty($this->filter_words)) {
$this->getFilters();
}
- 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 User has 2888 lines of code. Current threshold is 1000. Avoid really long classes. Open
class User extends Base {
/**
* Registry cache key
* @since Version 3.9.1
- Exclude checks
The method load() has 136 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function load($userId = false) {
if (filter_var($userId, FILTER_VALIDATE_INT)) {
$this->id = $userId;
}
- Exclude checks
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
- Exclude checks
The method populate() has 350 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function populate($force = false, $option = null) {
if ($force === false && !$this->isStale()) {
return $this;
}
- Exclude checks
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;
}
- Exclude checks
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;
}
- 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 an NPath complexity of 1474656. The configured NPath complexity threshold is 200. Open
public function fetch($id = false) {
if ($id) {
$this->id = $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
}
}