Showing 300 of 2,846 total issues
The function xoopspollBlockSinglepollShow() has an NPath complexity of 2331. The configured NPath complexity threshold is 200. Open
function xoopspollBlockSinglepollShow(mixed $options): array
{
$block = [];
/** @var \XoopsConfigHandler $configHandler */
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method listBlocks() has 180 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function listBlocks(): void
{
$pathIcon16 = Admin::iconUrl('', '16');
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
- Exclude checks
The function xoopspollBlockMultiShow() has 133 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function xoopspollBlockMultiShow(array $options): array
{
$block = [];
$pollOptionArray = [];
/** @var \XoopsModuleHandler $moduleHandler */
- Exclude checks
The function xoopspollBlockSinglepollEdit() has 144 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function xoopspollBlockSinglepollEdit(mixed $options): string
{
/**
* Options[]
* 0 = show expired polls in block
- Exclude checks
The method listBlocks() has an NPath complexity of 15553. The configured NPath complexity threshold is 200. Open
public function listBlocks(): void
{
$pathIcon16 = Admin::iconUrl('', '16');
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method isBlockCloned() has an NPath complexity of 1152. The configured NPath complexity threshold is 200. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups, bool $redirect = true)
{
\xoops_loadLanguage('admin', 'system');
\xoops_loadLanguage('admin/blocksadmin', 'system');
\xoops_loadLanguage('admin/groups', 'system');
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method orderBlock has 14 parameters. Consider reducing the number of parameters to less than 10. Open
public function orderBlock(
array $bid,
array $oldtitle,
array $oldside,
array $oldweight,
- Exclude checks
The method approve() has an NPath complexity of 1536. The configured NPath complexity threshold is 200. Open
public function approve(&$post, $force = false)
{
if (empty($post)) {
return false;
}
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method insert() has 113 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function insert(\XoopsObject $post, $force = true)
{
// Set the post time
// The time should be 'publish' time. To be adjusted later
if (!$post->getVar('post_time')) {
- Exclude checks
The method showPost() has 243 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function showPost($isadmin)
{
global $myts;
global $forumUrl, $forumImage;
global $viewtopic_users, $viewtopic_posters, $forum_obj, $topic_obj, $online, $user_karma, $viewmode, $order, $start, $total_posts, $topic_status;
- Exclude checks
The method _delete() has an NPath complexity of 19929. The configured NPath complexity threshold is 200. Open
private function _delete($post, $force = false)
{
if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
return false;
}
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method getUserbar() has an NPath complexity of 384. The configured NPath complexity threshold is 200. Open
public function getUserbar()
{
global $xoopsModuleConfig, $xoopsUser, $isadmin;
if (empty($GLOBALS['xoopsModuleConfig']['userbar_enabled'])) {
return null;
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method approve() has an NPath complexity of 1536. The configured NPath complexity threshold is 200. Open
public function approve(&$post, $force = false)
{
if (empty($post)) {
return false;
}
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method showPost() has 151 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function showPost($isadmin)
{
global $xoopsConfig, $xoopsModule, $xoopsUser, $myts;
/** @var Xoopspoll\Helper $helper */
$helper = Xoopspoll\Helper::getInstance();
- Exclude checks
The method insert() has an NPath complexity of 1632. The configured NPath complexity threshold is 200. Open
public function insert(\XoopsObject $post, $force = true)
{
// Set the post time
// The time should be 'publish' time. To be adjusted later
if (!$post->getVar('post_time')) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method insert() has an NPath complexity of 1632. The configured NPath complexity threshold is 200. Open
public function insert(\XoopsObject $post, $force = true)
{
global $xoopsUser;
// Set the post time
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method _delete() has 131 lines of code. Current threshold is set to 100. Avoid really long methods. Open
private function _delete($post, $force = false)
{
if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
return false;
}
- Exclude checks
The method insert() has 104 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function insert(\XoopsObject $post, $force = true)
{
global $xoopsUser;
// Set the post time
- Exclude checks
The method _delete() has an NPath complexity of 9639. The configured NPath complexity threshold is 200. Open
public function _delete($post, $force = false)
{
global $xoopsModule;
if (!is_object($post) || 0 == $post->getVar('post_id')) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method _delete() has 105 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function _delete($post, $force = false)
{
global $xoopsModule;
if (!is_object($post) || 0 == $post->getVar('post_id')) {
- Exclude checks