Showing 33 of 775 total issues
Function PrivateBin
has 2826 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
jQuery.PrivateBin = (function($, RawDeflate) {
'use strict';
/**
* zlib library interface
Function PrivateBin
has a Cognitive Complexity of 906 (exceeds 550 allowed). Consider refactoring. Open
Open
jQuery.PrivateBin = (function($, RawDeflate) {
'use strict';
/**
* zlib library interface
- 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 privatebin.js
has 2852 lines of code (exceeds 2000 allowed). Consider refactoring. Open
Open
/**
* PrivateBin
*
* a zero-knowledge paste bin
*
Function TopNav
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const TopNav = (function (window, document) {
const me = {};
let createButtonsDisplayed = false,
viewButtonsDisplayed = false,
Function AttachmentViewer
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const AttachmentViewer = (function () {
const me = {};
let $attachmentLink,
$attachmentPreview,
Function CryptTool
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const CryptTool = (function () {
const me = {};
/**
* base58 encoder & decoder
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(ConnectionInterface $connection, $name, $bucket, $generation = null, array $info = array(), $encryptionKey = null, $encryptionKeySHA256 = null)
Avoid deeply nested control flow statements. Open
Open
if (!unlink($path . $file)) {
throw new Exception('Error deleting file "' . $path . $file . '".');
}
Consider simplifying this complex logical expression. Open
Open
if (
(array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER) &&
$_SERVER['HTTP_X_REQUESTED_WITH'] == 'JSONHttpRequest') ||
($hasAcceptHeader &&
strpos($acceptHeader, self::MIME_JSON) !== false &&
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
Avoid too many return
statements within this function. Open
Open
return me.showPaste();
Avoid too many return
statements within this method. Open
Open
return 0;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return $n === 1 ? 0 : (($n === 0 || ($n % 100 > 0 && $n % 100 < 20)) ? 1 : 2);
Avoid too many return
statements within this method. Open
Open
return $n % 10 === 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return $this->_return_message(1, $e->getMessage());