Showing 1,477 of 1,477 total issues
Function getItems
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getItems(\CriteriaElement $criteria = null): array
{
$ret = [];
$sql = ' SELECT o.tl_id, o.tag_itemid, o.tag_modid, o.tag_catid, o.tag_time';
$sql .= " FROM {$this->table_link} AS o LEFT JOIN {$this->table} AS l ON l.{$this->keyName} = o.{$this->keyName}";
- 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 xnews_tag_iteminfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function xnews_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
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 xforum_tag_iteminfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function xforum_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
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 xfaq_tag_iteminfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function xfaq_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
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 tag_load_config
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function tag_load_config()
{
static $moduleConfig;
if (null === $moduleConfig) {
- 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
Method mymodule_tag_iteminfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mymodule_tag_iteminfo(array $items): bool
{
if (empty($items)) {
return false;
}
Method publisher_tag_iteminfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function publisher_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
return false;
}
Method execCurl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execCurl(): int
{
$curl = \curl_init($this->getServiceUrl());
\curl_setopt_array(
$curl,
Method newbb_tag_iteminfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function newbb_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
return false;
}
Method setType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setType($value = ''): void
{
if ('' !== $value) {
if (\is_array($value)) {
$value = isset($value['type']) ? \mb_strtolower($value['type']) : 'text';
Method randomquote_tag_iteminfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function randomquote_tag_iteminfo(array &$items): bool
{
$items_id = [];
$cats_id = [];
/*
Method getTagData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTagData(array $tags_array, int $font_max = 0, int $font_min = 0): array
{
// $tags_data_array = [];
// if (\is_array($tags_array) && !empty($tags_array)) {
// // set min and max tag count
Method tag_load_config
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tag_load_config()
{
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
trigger_error(__FUNCTION__ . " is deprecated, called from {$trace[0]['file']} line {$trace[0]['line']}");
$GLOBALS['xoopsLogger']->addDeprecated(
Method smartsection_tag_iteminfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smartsection_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
return false;
}
Method article_tag_iteminfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function article_tag_iteminfo(array &$items): bool
{
if (empty($items)) {
return false;
}
Method isBlockCloned
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups): void
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class TagCorePreload extends \XoopsPreloadItem
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class XoopsFormTag extends Tag\FormTag
- Exclude checks
Function tag_parse_args
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function tag_parse_args(&$args, &$args_string): bool
{
$args_abb = [
'c' => 'catid',
'm' => 'modid',
- 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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy(string $src, string $dest): bool
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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"