Showing 506 of 851 total issues
Function _deep_analysis
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
private function _deep_analysis(&$str, $ctype, $spos, $optimize = true)
{
//中文句子
if ($ctype == 1) {
- 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 MaterialDesign.Avatars.class.php
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* Material-Design-Avatars
* https://github.com/lincanbin/Material-Design-Avatars
*
Function authenticate
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate(
$username,
$password,
$authtype = null,
$realm = '',
- 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 msgHTML
has a Cognitive Complexity of 34 (exceeds 5 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) {
- 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 global.js
has 374 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 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
@set_time_limit(0);
date_default_timezone_set('Asia/Shanghai'); //设置中国时区
$Message = '';
$Version = '5.9.0';
Function createBody
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function createBody()
{
$body = '';
//Create unique IDs and preset boundaries
$this->uniqueid = md5(uniqid(time()));
- 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 topic.function.js
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global $ */
/*
* Carbon-Forum-F
* https://github.com/lincanbin/Carbon-Forum
*
Function addFile
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addFile(file) {
var $li = $('<li id="' + file.id + '">' +
'<p class="title">' + file.name + '</p>' +
'<p class="imgWrap"></p>' +
'<p class="progress"><span></span></p>' +
Function addFile
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addFile(file) {
var $li = $('<li id="' + file.id + '">' +
'<p class="title">' + file.name + '</p>' +
'<p class="imgWrap"></p>' +
'<p class="progress"><span></span></p>' +
Method authenticate
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function authenticate(
$username,
$password,
$authtype = null,
$realm = '',
File topic.php
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('InternalAccess')) exit('error: 403 Access Denied');
?>
<script type="text/javascript">
var TopicID = <?php echo $ID; ?>;
SMTP
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class SMTP
{
/**
* The PHPMailer SMTP version number.
* @var string
Function addFile
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addFile(file) {
var $li = $('<li id="' + file.id + '">' +
'<p class="title">' + file.name + '</p>' +
'<p class="imgWrap"></p>' +
'<p class="progress"><span></span></p>' +
Function InitNewTopicEditor
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
function InitNewTopicEditor() {
UE.delEditor('editor');
//Initialize editor
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
window.UEDITOR_CONFIG['textarea'] = 'Content';
Method ListDir
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ListDir($dir)
{
global $LanguageList;
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
Method _mime_types
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function _mime_types($ext = '')
{
$mimes = array(
'xl' => 'application/excel',
'js' => 'application/javascript',
Function stringify
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
baidu.json.stringify = (function () {
/**
* 字符串处理时需要转义的字符表
* @private
*/
Function createHeader
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function createHeader()
{
$result = '';
if ($this->MessageDate == '') {
- 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 _deep_analysis_cn
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private function _deep_analysis_cn(&$str, $lastec, $spos, $slen, $optimize = true)
{
$quote1 = chr(0x20) . chr(0x1C);
$tmparr = array();
$hasw = 0;
- 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"