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;
}
- 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 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;
}
- 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 an NPath complexity of 10368. The configured NPath complexity threshold is 200. Open
public function getWeatherForecast($days = 14) {
return false;
$weather = 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 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;
}
- 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 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");
}
- 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 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
- Exclude checks
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
*/
- 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 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
*/
- Exclude checks
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
*/
- 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($story_id = 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 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;
- 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 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'];
- 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 formatExif() has an NPath complexity of 320. The configured NPath complexity threshold is 200. Open
public function formatExif($exif) {
$format = array();
// Aperture
- 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 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")) {
- 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 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;
}
- 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 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);
/**
- 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 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);
/**
- Exclude checks
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;
- 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 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");
}
- Exclude checks
The method commit() has an NPath complexity of 320. The configured NPath complexity threshold is 200. Open
public function commit() {
$this->validate();
$data = 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
}
}