Showing 355 of 3,032 total issues
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return 'DESC';
Avoid too many return
statements within this method. Open
return 'DESC';
Function handleResponse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function handleResponse() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
var response = xmlhttp.responseText;
- 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 getObjects
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function &getObjects($criteria = null, $idAsKey = false, $asObject = true) //&getObjects($criteria = null, $idAsKey = false)
{
$ret = [];
$limit = $start = 0;
$sql = $this->selectQuery($criteria);
- 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 getPathStatus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getPathStatus($item, $getStatus = false)
{
$path = '';
if ('root' !== $item) {
$path = $item;
- 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 notNullFieldClause
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function notNullFieldClause($notNullFields = '', $withAnd = false)
{
$ret = '';
if ($withAnd) {
$ret .= ' AND ';
- 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 getOrderBy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getOrderBy($sort)
{
if ('datesub' === $sort) {
return 'DESC';
}
- 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 editFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function editFile($showmenu = false, $fileid = 0, $itemId = 0): void
{
$helper = Helper::getInstance();
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
- 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 convertIPAddresses
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function convertIPAddresses($tableName, $columnName): void
{
if ($this->tableHandler->useTable($tableName)) {
$attributes = $this->tableHandler->getColumnAttributes($tableName, $columnName);
if (false !== \mb_strpos($attributes, ' int(')) {
- 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 getTitle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getTitle($maxLength = 0, $format = 'S')
{
$ret = $this->getVar('title', $format);
if (0 != $maxLength) {
if (!XOOPS_USE_MULTIBYTES) {
- 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 getSubtitle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getSubtitle($maxLength = 0, $format = 'S')
{
$ret = $this->getVar('subtitle', $format);
if (0 != $maxLength) {
if (!XOOPS_USE_MULTIBYTES) {
- 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 sendNotifications
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function sendNotifications($notifications = []): void
{
/** @var \XoopsNotificationHandler $notificationHandler */
$notificationHandler = \xoops_getHandler('notification');
$tags = [];
- 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 createLogo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function createLogo($dirname)
{
if (!\extension_loaded('gd')) {
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 selectQuery
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function selectQuery($criteria = null, $join = false)
{
// if (!$join) {
// $sql = sprintf('SELECT * FROM `%s`', $this->db->prefix($this->dbtable));
// } else {
- 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"