Showing 80 of 101 total issues
Method grabEntries
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$ret = null;
$i = -1;
Method insert
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert(\XoopsObject $object, $force = true)
{
if (mb_strtolower(\get_class($object)) != mb_strtolower($this->objClass)) {
return false;
}
Method insert
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert(\XoopsObject $object, $force = false)
{
// $force = false;
if (mb_strtolower(\get_class($object)) != mb_strtolower($this->objClass)) {
return false;
Function grabEntries
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB):?array
{
$myts = \MyTextSanitizer::getInstance();
$ret = null;
- 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 grabEntries
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$ret = null;
$i = 0;
Method getObjects2
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getObjects2($criteria = null, string $fields = '*', string $key = ''): ?array
{
$ret = null;
$limit = $start = 0;
switch ($fields) {
Method rssfInsertChannel
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function rssfInsertChannel(\XoopsModule $xoopsMod): string
{
global $xoopsDB, $xoopsConfig;
$helper = Rssfit\Helper::getInstance();
$url = $xoopsDB->quoteString(XOOPS_URL);
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkVerModule(Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
Function loadTableFromArrayWithReplace
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace(string $table, array $data, string $search, string $replace): int
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
- 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 getObjects2
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getObjects2($criteria = null, string $fields = '*', string $key = ''): ?array
{
$ret = null;
$start = 0;
$limit = $start;
Function getObjects2
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getObjects2($criteria = null, string $fields = '*', string $key = ''): ?array
{
$ret = null;
$start = 0;
$limit = $start;
- 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 grabEntries
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$myts = \MyTextSanitizer::getInstance();
$ret = null;
$i = 0;
Method grabEntries
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB):?array
{
$myts = \MyTextSanitizer::getInstance();
$grouppermHandler = \xoops_getHandler('groupperm');
$ret = null;
Method grabEntries
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB):?array
{
$myts = \MyTextSanitizer::getInstance();
$ret = null;
Function rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir(string $src): 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"
Further reading
Function modifyObjects
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function modifyObjects(?\Criteria $criteria = null, array $fields = [], bool $force = false): ?string
{
if (\count($fields) > 0) {
$obj = new $this->objClass();
$sql = '';
- 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 modifyObjects
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function modifyObjects($criteria = null, array $fields = [], bool $force = false): ?string
{
if (\count($fields) > 0) {
$object = new $this->objClass();
$sql = '';
- 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 xoops_module_install_rssfit
has 31 lines of code (exceeds 25 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';
Method loadTableFromArrayWithReplace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace(string $table, array $data, string $search, string $replace): int
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method grabEntries
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function grabEntries(\XoopsMySQLDatabase $xoopsDB): ?array
{
$myts = \MyTextSanitizer::getInstance();
$ret = null;
require XOOPS_ROOT_PATH . '/include/comment_constants.php';