Showing 1,049 of 26,336 total issues
Function htmlPrepareClose
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
htmlPrepareClose: function () {
if (hs.geckoMac) { // bad redraws
if (!hs.mask) hs.mask = hs.createElement('div', null,
{position: 'absolute'}, hs.container);
hs.setStyles(hs.mask, {
- 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 calcExpanded
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
calcExpanded: function () {
var exp = this.exp;
this.justify = 'auto';
// get alignment
- 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 render
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function render($currentoption = 1, $display = true)
{
global $modversion;
$_dirname = $this->_obj->getVar('dirname');
$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 Sepia
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Sepia(&$gdimg, $amount, $targetColor)
{
$amount = (is_numeric($amount) ? max(0, min(100, $amount)) : 50);
$amountPct = $amount / 100;
$targetColor = (phpthumb_functions::IsHexColor($targetColor) ? $targetColor : 'A28065');
- 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 GetAllFilesInSubfolders
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function GetAllFilesInSubfolders($dirname)
{
$AllFiles = array();
$dirname = rtrim(realpath($dirname), '/\\');
if ($dirhandle = @opendir($dirname)) {
- 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 justify
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
Function htmlSizeOperations
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
htmlSizeOperations: function () {
this.setObjContainerSize(this.innerContent);
Function tableMouseUp
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Calendar.tableMouseUp = function (ev) {
var cal = Calendar._C;
if (!cal) {
return false;
}
Function hideShowCovered
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Calendar.prototype.hideShowCovered = function () {
if (!Calendar.is_ie && !Calendar.is_opera)
return;
function getVisib(obj) {
var value = obj.style.visibility;
Function justify
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
Function htmlSizeOperations
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
htmlSizeOperations: function () {
this.setObjContainerSize(this.innerContent);
Method _renderOptionTree
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
{
$tree .= $prefix
. '<input type="checkbox" name="'
. $this->getName()
Function contentLoaded
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
contentLoaded: function () {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
Method make_cal_link
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function make_cal_link($get_target = '', $smode = 'Monthly', $cid = 0, $caldate = '')
{
global $xoopsModule;
if ($cid < 0) {
Function keyHandler
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
keyHandler: function (e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
Method get_sql_set
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_sql_set($cols)
{
$ret = '';
foreach ($cols as $col => $types) {
Method resolvePath
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resolvePath($path, $allowed_dirs)
{
$this->DebugMessage('resolvePath: ' . $path . ' (allowed_dirs: ' . print_r($allowed_dirs, true) . ')', __FILE__, __LINE__);
// add base path to the top of the list
Function continuation_for_the_fucking_khtml_browser
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Calendar.continuation_for_the_fucking_khtml_browser = function () {
var w = self.element.offsetWidth;
var h = self.element.offsetHeight;
self.element.style.display = "none";
var valign = opts.substr(0, 1);
Function keyHandler
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
keyHandler: function (e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
Function init
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;