Showing 272 of 400 total issues
Function scan_tree
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scan_tree(tree,// the tree to be scanned
max_code // and its largest code of non zero frequency
) {
var n; // iterates over all tree elements
var prevlen = -1; // last emitted length
Function longest_match
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function longest_match(cur_match) {
var chain_length = max_chain_length; // max hash chain length
var scan = strstart; // current string
var match; // matched string
var len; // length of current match
Function _onDateChoose
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDateChoose: function (e) {
var target = $(e.target)
var first,
last;
Function __construct
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __construct($rootPath = '.')
{
$this->rootPath = $rootPath;
$this->versions = array();
$this->types = array();
- 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 inflateSync
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
that.inflateSync = function(z) {
var n; // number of bytes to look at
var p; // pointer to bytes
var m; // number of marker bytes found in a row
var r, w; // temporaries to save total_in and total_out
Function _liveCtxBind
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_liveCtxBind : function(ctx, e, data, fn, fnCtx) {
if(typeof e === 'object') {
if(functions.isFunction(data) || functions.isFunction(fn)) { // mod change event
e = this._buildModEventName(e);
} else {
Function getFileEntry
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFileEntry(fileEntry, entry, onend, onprogress, onerror, totalSize, checkCrc32) {
var currentIndex = 0;
function process(fileEntry, entry, onend, onprogress, onerror, totalSize) {
var childIndex = 0;
Function fill_window
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fill_window() {
var n, m;
var p;
var more; // Amount of free space at the end of the window.
Function append
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
that.append = function(data, onprogress) {
var err, buffers = [], lastIndex = 0, bufferIndex = 0, bufferSize = 0, array;
if (data.length === 0)
return;
z.next_in_index = 0;
Function addPointerEvent
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addPointerEvent(type, toExtend) {
var eventName = 'pointer' + type,
eventSpecial = $.event.special[eventName] = {
Function extendPointerRelease
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extendPointerRelease(params) {
var data = params.event.data;
return {
Function HttpReader
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function HttpReader(url) {
var that = this;
function getData(callback, onerror) {
var request;
Function emit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
emit : function(e, data) {
var storage = this[storageExpando],
eventInstantiated = false;
if(storage) {
Function sanitize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sanitize(options) {
var buttons;
var total;
if (typeof options !== "object") {
Function getEntries
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEntries : function(callback) {
if (reader.size < 22) {
onerror(ERR_BAD_FORMAT);
return;
}
Function lines
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Spinner.prototype.lines = function(el, o) {
var r = o.length+o.width
, s = 2*r
function grp() {
Function huft_build
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function huft_build(b, // code lengths in bits (all assumed <=
// BMAX)
bindex, n, // number of codes (assumed <= 288)
s, // number of simple-valued codes (0..s-1)
d, // list of base values for non-simple codes
Function inited
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'inited': function () {
var self = this;
this.bindTo('timeslot', 'click tap', function () {
this.toggleMod(this.elem('timeslot'), 'open', 'yes');
Function _changeMonth
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_changeMonth: function (direction) {
var self = this,
titleClickContent = this.months[this._dates[direction].month + 1] + ' ' + this._dates[direction].year,
backCalendar = this.findElem('body', 'position', 'back'),
Consider simplifying this complex logical expression. Open
Open
if ( ( minDateStr == '' && '' == maxDateStr ) ||
( minDateStr == '' && date <= maxDate ) ||
( minDate <= date && '' == maxDateStr ) ||
( minDate <= date && date <= maxDate ) )
{