Showing 955 of 1,787 total issues
Function imagecopymergealpha
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function imagecopymergealpha(&$dst_im, &$src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct = 0) {
$dst_x = (int) $dst_x;
$dst_y = (int) $dst_y;
$src_x = (int) $src_x;
$src_y = (int) $src_y;
- 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 init
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
var pl = "", f, val;
var type = "flash", fe, i;
ed = tinyMCEPopup.editor;
Consider simplifying this complex logical expression. Open
if ($this->processed) {
$this->file_dst_path = $server_path;
// repopulate dst variables from src
$this->file_dst_name = $this->file_src_name;
Function _create
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
File advlink.js
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Functions for the advlink plugin popup */
tinyMCEPopup.requireLangPack();
var templates = {
Function init
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function(s) {
var t = this, pl, sl = tinymce.ScriptLoader, c, e, el = [], ed;
function execCallback(se, n, s) {
var f = se[n];
Function _applyInlineStyle
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
_applyInlineStyle : function(na, at, op) {
var t = this, ed = t.editor, dom = ed.dom, bm, lo = {}, kh, found;
na = na.toUpperCase();
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Consider simplifying this complex logical expression. Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Consider simplifying this complex logical expression. Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Function _serializeNode
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
_serializeNode : function(n, inn) {
var t = this, s = t.settings, w = t.writer, hc, el, cn, i, l, a, at, no, v, nn, ru, ar, iv, closed;
if (!s.node_filter || s.node_filter(n)) {
switch (n.nodeType) {
Function init
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function() {
var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re;
EditorManager.add(t);
Function reposition
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
;PROTOTYPE.reposition = function(event, effect) {
if(!this.rendered || this.positioning || this.destroyed) { return this; }
// Set positioning flag
this.positioning = TRUE;
Function generateCSS
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateCSS() {
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
ce.style.cssText = "";
Function support
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.support = (function( support ) {
var all, a, input, select, fragment, opt, eventName, isSupported, i,
div = document.createElement("div");
Function _init
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
_init : function() {
var t = this, d = document, w = window, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
t.isOpera = w.opera && opera.buildNumber;
- 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 searchNext
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
searchNext : function(a) {
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
// Get input
f = document.forms[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 imagecreatefrombmp
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function imagecreatefrombmp($filename) {
if (! $f1 = fopen($filename,"rb")) return false;
$file = unpack("vfile_type/Vfile_size/Vreserved/Vbitmap_offset", fread($f1,14));
if ($file['file_type'] != 19778) 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 _create
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Function generatePreview
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function generatePreview(c) {
var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
p.innerHTML = '<!-- x --->';
- 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"