Showing 1,011 of 9,214 total issues
The method getRegions() has 138 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getRegions($country = false) {
$query = "SELECT COUNT(l.id) AS count, l.region_slug AS slug,
g.region_name AS name, g.region_code, g.timezone
FROM location AS l
LEFT JOIN geoplace AS g ON l.geoplace = g.id
- 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 getPhotoContext() has 115 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function getPhotoContext(Image $imageObject, $unapprovedOnly = null) {
$Database = (new AppCore)->getDatabaseConnection();
if ($unapprovedOnly == false || $unapprovedOnly == null) {
- Exclude checks
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 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 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 isClientBanned() has an NPath complexity of 18432. The configured NPath complexity threshold is 200. Open
public static function isClientBanned($userId, $remoteAddr, $force = null) {
if ($remoteAddr == "58.96.64.238" || $userId == 71317) {
$force = 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 suggestLocos() has an NPath complexity of 5376. The configured NPath complexity threshold is 200. Open
public static function suggestLocos(Image $imageObject, $skipTagged = null) {
$locolookup = array();
$locos = 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 resolveTemplate() has an NPath complexity of 5616. The configured NPath complexity threshold is 200. Open
public function resolveTemplate($template) {
if (pathinfo($template, PATHINFO_EXTENSION) == "tpl" && file_exists($template)) {
return $template;
}
- 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 parse() has an NPath complexity of 57606. The configured NPath complexity threshold is 200. Open
public function parse() {
if (empty($this->feeds)) {
throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
}
- 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 768. The configured NPath complexity threshold is 200. Open
private function validate() {
if (!filter_var($this->lat, FILTER_VALIDATE_FLOAT)) {
throw new Exception("Cannot validate location - no latitude value");
}
- 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 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 validate() has an NPath complexity of 3072. The configured NPath complexity threshold is 200. Open
public function validate() {
if (is_null($this->object_id)) {
$this->object_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 find() has an NPath complexity of 7778. The configured NPath complexity threshold is 200. Open
public static function find() {
$args = func_get_args();
$Loco = false;
$LocoClass = 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 parse() has 126 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function parse() {
if (empty($this->feeds)) {
throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
}
- Exclude checks
The method getContents() has an NPath complexity of 384. The configured NPath complexity threshold is 200. Open
public function getContents($page = 1, $items_per_page = 25) {
if (empty($this->folder)) {
throw new Exception("Cannot get folder contents - no folder specified");
}
- 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 personaliseContent() has 153 lines of code. Current threshold is set to 100. Avoid really long methods. Open
private function personaliseContent() {
$replacements = array();
Debug::LogCLI("Looping through " . count($this->recipients) . " users and preparing email decoration");
- Exclude checks
The method process() has 113 lines of code. Current threshold is set to 100. Avoid really long methods. Open
private function process(array $item) {
/**
* Process the description field
*/
- Exclude checks
The method EmbedGoogleMap() has an NPath complexity of 294. The configured NPath complexity threshold is 200. Open
public static function EmbedGoogleMap(DOMElement $e) {
$timer = Debug::GetTimer();
$Config = AppCore::GetConfig();
- 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 __construct() has an NPath complexity of 648. The configured NPath complexity threshold is 200. Open
public function __construct() {
$this->Memcached = new Memcached;
if (!defined("RP_SITE_DOMAIN")) {
- 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
}
}