Showing 80 of 101 total issues
Method outputRssFeed
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function outputRssFeed(string $feed_url, int $maxItemCount = 10, bool $show_date = true, bool $show_description = true, int $max_words = 0): void
Method truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $text,
?int $length = 100,
string $ending = '...',
bool $exact = false,
bool $considerHtml = true
Function renameColumns
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function renameColumns(): void
{
foreach ($this->renameColumns as $tableName) {
if ($this->tableHandler->useTable($tableName)) {
$oldName = $tableName['from'];
- 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 getActivatedSubfeeds
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function &getActivatedSubfeeds(string $fields = '', string $type = ''): ?array
{
$ret = null;
$subs = $this->pluginHandler->getObjects2(new \Criteria('subfeed', '1'), $fields);
if (\is_array($subs) && !empty($subs)) {
- 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 xoops_module_update_rssfit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_rssfit(\XoopsModule $xoopsMod, int $previousVersion): bool
{
global $xoopsDB;
$helper = Rssfit\Helper::getInstance();
// rssfInstallLangFile($xoopsMod, $xoopsConfig['language']);
- 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 getEditor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getEditor(?\Xmf\Module\Helper $helper = null, ?array $options = null): ?\XoopsFormTextArea
{
$descEditor = null;
/** @var Helper $helper */
- 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 getSticky
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getSticky(array &$feed): bool
{
if (!$intr = $this->miscHandler->getObjects2(new \Criteria('misc_category', 'sticky'))) {
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
Avoid too many return
statements within this method. Open
return $object->getVar($this->objKey);
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $object->getVar($this->objKey);
Function checkSubFeed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function checkSubFeed(array &$feed): void
{
if (!empty($feed['plugin'])) {
$criteria = new \CriteriaCompo();
$criteria->add(new \Criteria('rssf_filename', \sprintf($this->pluginFile, $feed['plugin'])));
- 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 grabEntries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$ret = null;
$i = 0;
// The following example code grabs the latest entries from the module
- 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 grabEntries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$myts = \MyTextSanitizer::getInstance();
/** @var \XoopsGroupPermHandler $grouppermHandler */
- 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 grabEntries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB):?array
{
@require_once XOOPS_ROOT_PATH . '/modules/wfsection/include/groupaccess.php';
$ret = null;
$i = 0;
- 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 grabEntries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$myts = \MyTextSanitizer::getInstance();
$ret = null;
require XOOPS_ROOT_PATH . '/include/comment_constants.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 grabEntries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
global $xoopsUser;
$groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- 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 loadSampleData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function loadSampleData(): void
{
global $xoopsConfig;
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
- 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 xoops_module_uninstall_rssfit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_uninstall_rssfit(\XoopsModule $module): bool
{
// return true;
$moduleDirName = \basename(\dirname(__DIR__));
- 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 xoops_module_install_rssfit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_install_rssfit(\XoopsModule $module): bool
{
require_once \dirname(__DIR__) . '/preloads/autoloader.php';
require_once \dirname(__DIR__, 3) . '/mainfile.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"