Showing 272 of 400 total issues
File localization.js
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
var localization = {
browser_language: 'en',
chosen_language: 'en',
File Localization.inc.php
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
define('MANUL_LANG_ID_RU', 'ru');
define('MANUL_LANG_ID_EN', 'en');
define('MANUL_LANG_ID_UA', 'uk');
Function xml2json
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xml2json(xml, tab) {
var X = {
toObj: function(xml) {
var o = {};
if (xml.nodeType==1) { // element node ..
Function prompt
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.prompt = function() {
var options;
var defaults;
var dialog;
var form;
Function Tree
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Tree() {
var that = this;
// dyn_tree; // the dynamic tree
// max_code; // largest code with non zero frequency
Function huft_build
has 133 lines of code (exceeds 25 allowed). Consider refactoring. 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 createZipWriter
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createZipWriter(writer, onerror, dontDeflate) {
var worker, files = {}, filenames = [], datalength = 0;
function terminate(callback, message) {
if (worker)
File analyzer.tableBuilder.js
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
var logLoaded = false;
var filesDataTable = null;
var numberItemsInFilter;
var data = "";
Function detectMalware
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function detectMalware($filePath, &$foundFragment, &$pos, $startTime, $timeout, $ext)
{
if (filesize($filePath) > $this->MAX_FILESIZE) {
return 'skipped';
- 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 inflate
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
that.inflate = function(z, f) {
var r;
var b;
if (!z || !z.istate || !z.next_in)
Function createZipReader
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createZipReader(reader, onerror) {
function Entry() {
}
Entry.prototype.getData = function(writer, onend, onprogress, checkCrc32) {
Function _buildDatepickerGridBEMJSON
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildDatepickerGridBEMJSON: function (dateCtx) {
var self = this,
grid = [],
gridMap = this._buildGridMap(dateCtx);
Function buildTable
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildTable(data) {
window.filesDataTable = $('#filesTable').dataTable({
"order": [[ 0, "desc" ]],
"aLengthMenu": [[100, 10, 500, -1], [100, 10, 500, "All"]],
Function folderWalker
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function folderWalker($path, &$files_found)
{
if ($path === '.')
$path = $_SERVER['DOCUMENT_ROOT'];
- 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 MalwareDetector.inc.php
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
ob_start();
require_once('XmlValidator.inc.php');
require_once('FileInfo.inc.php');
Function HashTable
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function HashTable(obj)
{
this.length = 0;
this.items = {};
for (var p in obj) {
- 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 start
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function start()
{
global $projectTmpDir, $php_errormsg;
$authenticator = new Auth();
- 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 deflate
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
that.deflate = function(_strm, flush) {
var i, header, level_flags, old_flush, bstate;
if (flush > Z_FINISH || flush < 0) {
return Z_STREAM_ERROR;
Function dialog
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.dialog = function(options) {
options = sanitize(options);
var dialog = $(templates.dialog);
var innerDialog = dialog.find(".modal-dialog");
Function deflate_slow
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deflate_slow(flush) {
// short hash_head = 0; // head of hash chain
var hash_head = 0; // head of hash chain
var bflush; // set if current block must be flushed
var max_insert;