Showing 506 of 851 total issues
Function CreateNewTopic
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CreateNewTopic() {
if (!document.NewForm.Title.value.length) {
CarbonAlert(Lang['Title_Can_Not_Be_Empty']);
document.NewForm.Title.focus();
return false;
Function fileUploader
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
baidu.flash.fileUploader = baidu.flash.fileUploader || function(options){
var me = this,
options = options || {};
options.createOptions = baidu.extend({
- 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 ue_callback
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function ue_callback(url, state) {
var doc = document,
picBorard = $G("J_picBoard"),
img = doc.createElement("img");
- 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 exec
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function exec(scrawlObj) {
if (scrawlObj.isScrawl) {
addMaskLayer(lang.scrawlUpLoading);
var base64 = scrawlObj.getCanvasData();
if (!!base64) {
- 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 validateAddress
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function validateAddress($address, $patternselect = null)
{
if (is_null($patternselect)) {
$patternselect = self::$validator;
}
- 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 parseHelloFields
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function parseHelloFields($type)
{
$this->server_caps = array();
$lines = explode("\n", $this->helo_rply);
- 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 smtpSend
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function smtpSend($header, $body)
{
$bad_rcpt = array();
if (!$this->smtpConnect($this->SMTPOptions)) {
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
- 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
Method topicAddTag
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function topicAddTag($TopicInfo)
{
global $TimeStamp;
Auth(4, $TopicInfo['UserID'], true);
$TagName = TagsDiff(array(
Method sendmailSend
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function sendmailSend($header, $body)
{
if ($this->Sender != '') {
if ($this->Mailer == 'qmail') {
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
Method msgHTML
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function msgHTML($message, $basedir = '', $advanced = false)
{
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $images)) {
foreach ($images[2] as $imgindex => $url) {
File layout.php
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('InternalAccess')) exit('error: 403 Access Denied');
//只有上一页下一页的分页
function PaginationSimplified($PageUrl, $CurrentPage, $IsLastPage = false)
Function getHtml
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
getHtml: function(code)
{
var html = '',
classes = [ 'syntaxhighlighter' ],
tabSize,
Function setState
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setState(val, files) {
if (val != state) {
var stats = uploader.getStats();
Function Brush
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Brush()
{
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
Function setState
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setState(val, files) {
if (val != state) {
var stats = uploader.getStats();
Function setState
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setState(val, files) {
if (val != state) {
var stats = uploader.getStats();
File new.php
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require(LanguagePath . 'new.php');
require (LibraryPath . 'Geetestlib.class.php');
Auth(1, 0, true);
Method CreateMessage
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CreateMessage($DialogInfo, $Content)
{
global $DB, $CurUserID, $TimeStamp;
if (empty($CurUserID) || empty($DialogInfo) || empty($Content)) {
return false;
Function CreateNewTopic
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function CreateNewTopic() {
if (!document.NewForm.Title.value.length) {
alert(Lang['Title_Can_Not_Be_Empty']);
document.NewForm.Title.focus();
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 searchLike
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function searchLike( $pKeywords, $index='*', $pStart = 0,
$pSize=12, $filter = '', $sort = '', $columns=array("ID") ) {
self::getSingle();
$sp = self::$sphinx;
empty( $sort ) || $sp->SetSortMode ( SPH_SORT_EXTENDED, $sort );
- 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"