Showing 506 of 851 total issues
Function highlight
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
highlight: function(globalParams, element)
{
var elements = this.findElements(globalParams, element),
propertyName = 'innerHTML',
highlighter = null,
Function renderCharts
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderCharts () {
var data = collectData();
$('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
Function ReplyToTopic
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function ReplyToTopic() {
if (!UE.getEditor('editor').getContent().length) {
alert(Lang['Content_Empty']);
UE.getEditor('editor').focus();
} else {
- 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 addOkListener
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function addOkListener() {
dialog.onok = function() {
if (!imageUrls.length) return;
var urlPrefix = editor.getOpt('imageUrlPrefix'),
images = domUtils.getElementsByTagName(editor.document,"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 cleanAttributes
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function cleanAttributes(DOMElement $elem)
{
$tagName = strtolower($elem->nodeName);
$attributes = $elem->attributes;
$attributesWhiteList = $this->config->WhiteListHtmlGlobalAttributes;
- 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 SetSource
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function SetSource($source, $source_charset = 'utf-8', $target_charset = 'utf-8')
{
$this->sourceCharSet = strtolower($source_charset);
$this->targetCharSet = strtolower($target_charset);
$this->simpleResult = array();
- 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 GetNextSQL
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function GetNextSQL()
{
global $fp;
$sql = "";
while ($line = fgets($fp, 40960)) {
- 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 GetFinallyResult
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function GetFinallyResult($spword = ' ', $word_meanings = false)
{
$rsstr = '';
foreach ($this->finallyResult as $v) {
if ($this->resultType == 2 && ($v['t'] == 3 || $v['t'] == 5)) {
- 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 encodeHeader
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function encodeHeader($str, $position = 'text')
{
$matchcount = 0;
switch (strtolower($position)) {
case 'phrase':
- 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 inText
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inText(stream, state) {
function chain(parser) {
state.tokenize = parser;
return parser(stream, state);
}
Method encodeHeader
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function encodeHeader($str, $position = 'text')
{
$matchcount = 0;
switch (strtolower($position)) {
case 'phrase':
Function initGeetest
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
var initGeetest = function (userConfig, callback) {
var config = new Config(userConfig);
if (userConfig.https) {
config.protocol = 'https://';
} else if (!userConfig.protocol) {
Method data
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function data($msg_data)
{
//This will use the standard timelimit
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return false;
Function Manage
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Manage(ID, Type, Action, NeedToConfirm, TargetTag) {
if(NeedToConfirm){
$.afui.popup({
title: Lang['Confirm'],
message: Lang['Confirm_Operation'],
Function initEvent
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initEvent () {
var cacheValue = null,
//图表类型数
typeViewCount = chartsConfig.length- 1,
Method sendCommand
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function sendCommand($command, $commandstring, $expect)
{
if (!$this->connected()) {
$this->setError("Called $command without being connected");
return false;
Function version
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
baidu.swf.version = (function () {
var n = navigator;
if (n.plugins && n.mimeTypes.length) {
var plugin = n.plugins["Shockwave Flash"];
if (plugin && plugin.description) {
- 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 stringify
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
baidu.json.stringify = (function () {
/**
* 字符串处理时需要转义的字符表
* @private
*/
- 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 DKIM_Add
has a Cognitive Complexity of 13 (exceeds 5 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
- 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 Filter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function Filter($Content)
{
if (is_file(LibraryPath . 'Filtering.words.config.json')) {
$FilteringWords = JsonDecode(file_get_contents(LibraryPath . 'Filtering.words.config.json'));
} else {
- 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"