Showing 708 of 9,214 total issues
Avoid too many return
statements within this method. Open
Open
return $fullArray ? $result : $result['message_text'];
Avoid too many return
statements within this method. Open
Open
return $this->db->fetchRow($query, $id);
Avoid too many return
statements within this method. Open
Open
return $fullArray ? $result : $result['message_text'];
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return self::EmbedGoogleMap($e);
Avoid too many return
statements within this method. Open
Open
return new Topic("other-rail");
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return new Topic("other-rail");
Avoid too many return
statements within this method. Open
Open
return sprintf($diff > 1 ? '%s years ago' : 'last year', $diff);
Avoid too many return
statements within this method. Open
Open
return sprintf($diff > 1 ? '%s months ago' : 'last month', $diff);
Avoid too many return
statements within this method. Open
Open
return sprintf($diff > 1 ? '%s weeks ago' : 'one week ago', $diff);
Avoid too many return
statements within this method. Open
Open
return $this->Event->meta['address'];
Avoid too many return
statements within this method. Open
Open
return $this->findFromTags($args);
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return $result === false ? 0 : count($result);
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return false;
Function getGroups
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getGroups($force = null) {
if (!filter_var($this->id, FILTER_VALIDATE_INT)) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function normaliseAvatarPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function normaliseAvatarPath($data) {
if (!is_null(filter_var($data['user_avatar'], FILTER_SANITIZE_STRING))) {
$data['user_avatar_filename'] = $data['user_avatar'];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"