Showing 300 of 2,846 total issues
File jquery-ui-timepicker-addon.js
has 1782 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
(function (factory) {
if (typeof define === 'function' && define.amd) {
File Post.php
has 800 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/**
* Newbb module
*
File viewtopic.php
has 660 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/*------------------------------------------------------------------------
XOOPS - PHP Content Management System
Copyright (c) 2000-2020 XOOPS.org
<https://xoops.org>
Function _delete
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
private function _delete($post, $force = false)
{
if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
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
File main.php
has 591 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/*
XOOPS - PHP Content Management System
Copyright (c) 2000-2020 XOOPS.org
<https://xoops.org>
File viewtopic.php
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/**
* Newbb module
*
File Blocksadmin.php
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Xoopspoll\Common;
/**
File Post.php
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Newbb;
/*
Function _delete
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function _delete($post, $force = false)
{
global $xoopsModule;
if (!is_object($post) || 0 == $post->getVar('post_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 truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public static function truncateHtml(
string $text,
?int $length = 100,
?string $ending = '...',
?bool $exact = 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
Method showPost
has 201 lines of code (exceeds 25 allowed). Consider refactoring. 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;
File polls.php
has 495 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/*
* Newbb module
*
* You may not change or alter any portion of this comment or credits
File main.php
has 480 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
if (defined('MAIN_DEFINED')) {
return;
}
Function xoops_module_update_xoopspoll
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_xoopspoll(\XoopsModule $module, $prev_version): bool
{
// referer check
$success = false;
$ref = xoops_getenv('HTTP_REFERER');
- 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 _limitMinMaxDateTime
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
_limitMinMaxDateTime: function (dp_inst, adjustSliders) {
var o = this._defaults,
dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
if (!this._defaults.showTimepicker) {
Function xoopspollBlockSinglepollShow
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function xoopspollBlockSinglepollShow(mixed $options): array
{
$block = [];
/** @var \XoopsConfigHandler $configHandler */
- 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 _injectTimePicker
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
_injectTimePicker: function () {
var $dp = this.inst.dpDiv,
o = this.inst.settings,
tp_inst = this,
litem = '',
Function showPost
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. 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;
- 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 listBlocks
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function listBlocks(): void
{
$pathIcon16 = Admin::iconUrl('', '16');
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
File PostHandler.php
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Newbb;
/*