Showing 506 of 851 total issues
Function InitEditor
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function InitEditor() {
//Initialize editor
UE.delEditor('editor');
window.UEDITOR_CONFIG['textarea'] = 'Content';
window.UEDITOR_CONFIG['elementPathEnabled'] = false;
File new.function.js
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Carbon-Forum-F
* https://github.com/lincanbin/Carbon-Forum
*
* Copyright 2006-2017 Canbin Lin (lincanbin@hotmail.com)
File index.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<meta charset="utf-8">
<?php
@set_time_limit(0);
date_default_timezone_set('Asia/Shanghai');
Method wrapText
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function wrapText($message, $length, $qp_mode = false)
{
if ($qp_mode) {
$soft_break = sprintf(' =%s', $this->LE);
} else {
Function onMouseDown
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onMouseDown(e) {
setShift(e.shiftKey);
// Check whether this is a click in a widget
for (var n = e_target(e); n != wrapper; n = n.parentNode)
if (n.parentNode == code && n != mover) return;
Manage
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Manage
{
private $id;
private $action;
private $db;
Method AlertMsg
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AlertMsg($PageTitle, $Error, $StatusCode = 200)
{
global $Lang, $CurProtocol, $RequestURI, $UrlPath, $IsAjax, $IsMobile, $IsApp, $DB, $Config, $HotTagsArray, $CurUserID, $CurUserName, $CurUserCode, $CurUserRole, $CurUserInfo, $FormHash, $StartTime, $PageMetaKeyword, $TemplatePath;
$HttpStatuses = [
100 => 'Continue',
Function fileUploader
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
baidu.flash.fileUploader = baidu.flash.fileUploader || function(options){
var me = this,
options = options || {};
options.createOptions = baidu.extend({
Function AutoTest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function AutoTest($Method, $View, $URL, $Parameters = [], $ExpectedStatusCode = 200, $Callback = null)
{
global $APISignature, $Passed, $Failed;
$Pass = true;
echo "\n\033[33m --------$Method $URL expect $ExpectedStatusCode-------- \033[0m\n\n";
- 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 Pagination
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function Pagination($PageUrl, $CurrentPage, $TotalPage)
{
if ($TotalPage <= 1)
return false;
global $Config, $Lang;
- 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 statistics.php
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('InternalAccess')) exit('error: 403 Access Denied');
?>
<!-- main-content start -->
<script type="text/javascript">
Function _addBoardListener
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
_addBoardListener:function (saveNum) {
var me = this,
margin = 0,
startX = -1,
startY = -1,
Method createHeader
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createHeader()
{
$result = '';
if ($this->MessageDate == '') {
Method preSend
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preSend()
{
try {
$this->error_count = 0; // Reset errors
$this->mailHeader = '';
Function data
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function data($msg_data)
{
//This will use the standard timelimit
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return 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 FormatTime
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function FormatTime($UnixTimeStamp)
{
global $Lang;
$Seconds = $_SERVER['REQUEST_TIME'] - $UnixTimeStamp;
if ($Seconds < 2592000) {
- 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 upFile
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function upFile()
{
$file = $this->file = $_FILES[$this->fileField];
if (!$file) {
$this->stateInfo = $this->getStateInfo("ERROR_FILE_NOT_FOUND");
- 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 checkIdenticalFiles
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function checkIdenticalFiles($tempFileName, $inputType)
{
if ($this->DB) {
if ($inputType == 'string') {
$this->fileMD5 = md5($tempFileName);
- 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 RenderTopic
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RenderTopic() {
//强制所有链接在新窗口中打开
var AllPosts = document.getElementsByClassName("comment-content");
PostContentLists = {};//Global
AllPosts[AllPosts.length] = document.getElementsByClassName("topic-content")[0];
Method DKIM_Add
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DKIM_Add($headers_line, $subject, $body)
{
$DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
$DKIMquery = 'dns/txt'; // Query method