Showing 506 of 851 total issues
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $this->server_caps[$name];
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Function trim3
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function trim3(str) {
if(str){
str = str.replace(/^(\s|\u00A0)+/, '');
for (var i = str.length - 1; i >= 0; i--) {
if (/\S/.test(str.charAt(i))) {
- 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 RecoverTopicContents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function RecoverTopicContents() {
var DraftTitle = localStorage.getItem(Prefix + "TopicTitle");
var DraftContent = localStorage.getItem(Prefix + "TopicContent");
var DraftTagsList = JSON.parse(localStorage.getItem(Prefix + "TopicTagsList"));
if (DraftTitle) {
- 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 trim3
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function trim3(str) {
if (str) {
str = str.replace(/^(\s|\u00A0)+/, '');
for (var i = str.length - 1; i >= 0; i--) {
if (/\S/.test(str.charAt(i))) {
- 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 CheckUserNameExist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function CheckUserNameExist() {
if ($("#UserName").val()) {
$.ajax({
url: WebsitePath + '/json/user_exist',
data: {
- 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 tagUploadIcon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function tagUploadIcon($TagInfo)
{
Auth(3);
if ($_FILES['TagIcon']['size'] && $_FILES['TagIcon']['size'] < 1048576) {
require(LibraryPath . "ImageResize.class.php");
- 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 each
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
baidu.each = baidu.array.forEach = baidu.array.each = function (source, iterator, thisObject) {
var returnValue, item, i, len = source.length;
if ('function' == typeof iterator) {
for (i = 0; i < len; i++) {
- 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 callByBrowser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
baidu.sio.callByBrowser = function (url, opt_callback, opt_options) {
var scr = document.createElement("SCRIPT"),
scriptLoaded = 0,
options = opt_options || {},
charset = options['charset'],
- 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 deleteUpload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function deleteUpload($uploadRecordList)
{
foreach ($uploadRecordList as $uploadRecord) {
$numberDuplicateFiles = $this->db->single('SELECT count(*) FROM ' . PREFIX . 'upload
WHERE
- 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 punyencodeAddress
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function punyencodeAddress($address)
{
// Verify we have required functions, CharSet, and at-sign.
if ($this->idnSupported() and
!empty($this->CharSet) and
- 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"