Showing 105 of 1,477 total issues
Function myalbum0_tag_iteminfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function myalbum0_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_define_url_delimiter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function tag_define_url_delimiter(): void
{
if (\defined('URL_DELIMITER')) {
if (!\in_array(URL_DELIMITER, ['?', '/'], true)) {
exit('Security Violation');
- 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 newbb_tag_iteminfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function newbb_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 randomquote_tag_iteminfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function randomquote_tag_iteminfo(array &$items): bool
{
$items_id = [];
$cats_id = [];
/*
- 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 getByItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getByItem(int $itemid, int $modid = 0, int $catid = 0): array
{
$ret = [];
$modid = (empty($modid) && \is_object($GLOBALS['xoopsModule'])
- 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"