Showing 272 of 400 total issues
Function HttpRangeReader
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function HttpRangeReader(url) {
var that = this;
function init(callback, onerror) {
var request = new XMLHttpRequest();
Function compress_block
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function compress_block(ltree, dtree) {
var dist; // distance of matched string
var lc; // match length or unmatched char (if dist === 0)
var lx = 0; // running index in l_buf
var code; // the code to send
Function deflate_stored
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function deflate_stored(flush) {
// Stored blocks are limited to 0xffff bytes, pending_buf is limited
// to pending_buf_size, and each stored block has a 5 byte header:
var max_block_size = 0xffff;
Function launchProcess
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function launchProcess(process, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
var chunkIndex = 0, index, outputSize = 0;
function step() {
var outputData;
Function deflateInit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
that.deflateInit = function(strm, _level, bits, _method, memLevel, _strategy) {
if (!_method)
_method = Z_DEFLATED;
if (!memLevel)
memLevel = DEF_MEM_LEVEL;
Method repackXMLLog
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function repackXMLLog()
{
global $projectRootDir;
$xmlLogFilename = $this->XML_LOG_FILENAME;
Function spin
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
spin: function(target) {
this.stop()
var self = this
, o = self.opts
Function extendPointerPress
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extendPointerPress(params) {
var data = params.event.data;
return {
Function inflate_flush
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
that.inflate_flush = function(z, r) {
var n;
var p;
var q;
Function launchProcess
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function launchProcess(process, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
Function launchWorkerProcess
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function launchWorkerProcess(worker, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
Function checkForValidPhp
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function checkForValidPhp($content)
{
$len = strlen($content);
$start = 0;
$valid = 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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __construct($filename, $mode = 'r')
{
$this->filename = $filename;
$this->mode = $mode;
$result = 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 on
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
on : function(e, data, fn, ctx, _special) {
if(typeof e === 'string') {
if(functions.isFunction(data)) {
ctx = fn;
fn = data;
Method folderWalker
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function folderWalker($path, &$files_found)
{
if ($path === '.')
$path = $_SERVER['DOCUMENT_ROOT'];
Function process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function process(fileEntry, entry, onend, onprogress, onerror, totalSize) {
var childIndex = 0;
function addChild(child) {
function nextChild(childFileEntry) {
Function base64_decode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function base64_decode(data) {
if (!data)
return "";
// discuss at: http://phpjs.org/functions/base64_decode/
Method start
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function start()
{
global $projectTmpDir, $php_errormsg;
$authenticator = new Auth();
Function onTouchStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
FastClick.prototype.onTouchStart = function(event) {
'use strict';
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
Function step
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function step() {
var outputData;
index = chunkIndex * CHUNK_SIZE;
if (index < size)
reader.readUint8Array(offset + index, Math.min(CHUNK_SIZE, size - index), function(inputData) {