Showing 506 of 851 total issues
Function highlightWorker
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function highlightWorker() {
var end = +new Date + options.workTime;
var foundWork = work.length;
while (work.length) {
if (!getLine(showingFrom).stateAfter) var task = showingFrom;
Function getFileData
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getFileData: function () {
var _this = this;
if(!_this.listEnd && !this.isLoadingData) {
this.isLoadingData = true;
Function CreateNewTopic
has a Cognitive Complexity of 12 (exceeds 5 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;
- 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 topicAddTag
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function topicAddTag($TopicInfo)
{
global $TimeStamp;
Auth(4, $TopicInfo['UserID'], true);
$TagName = TagsDiff(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 renderTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function renderTable ( table ) {
var tableHtml = [];
//构造数据
- 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 setError
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function setError($msg)
{
$this->error_count++;
if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
$lasterror = $this->smtp->getError();
- 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 GetFinallyKeywords
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function GetFinallyKeywords($num = 10)
{
$n = 0;
$arr = $this->GetFinallyIndex();
$okstr = '';
- 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 GetFinallyIndex
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function GetFinallyIndex()
{
$rearr = array();
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 addAnAddress
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function addAnAddress($kind, $address, $name = '')
{
if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) {
$error_message = $this->lang('Invalid recipient kind: ') . $kind;
$this->setError($error_message);
- 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 fromTextArea
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
CodeMirror.fromTextArea = function(textarea, options) {
if (!options) options = {};
options.value = textarea.value;
if (!options.tabindex && textarea.tabindex)
options.tabindex = textarea.tabindex;
Function matchBrackets
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matchBrackets(autoclear) {
var head = sel.inverted ? sel.from : sel.to, line = getLine(head.line), pos = head.ch - 1;
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
if (!match) return;
var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles;
Function initEvents
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
initEvents: function(){
var _this = this;
/* 点击搜索按钮 */
domUtils.on($G('searchBtn'), 'click', function(){
Function ue_callback
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ue_callback(url, state) {
var doc = document,
picBorard = $G("J_picBoard"),
img = doc.createElement("img");
Function createTab
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createTab( tabName ) {
var faceVersion = "?v=1.1", //版本号
tab = $G( tabName ), //获取将要生成的Div句柄
imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
positionLine = 11 / 2, //中间数
Method setLanguage
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setLanguage($langcode = 'en', $lang_path = '')
{
// Define full set of translatable strings in English
$PHPMAILER_LANG = array(
'authenticate' => 'SMTP Error: Could not authenticate.',
Method get_lines
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_lines()
{
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
Function upload
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.upload = function(options) {
var opts = $.extend(jQuery.uploadDefault, options);
if (opts.url === '') {
return;
}
Function onDrop
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onDrop(e) {
e.preventDefault();
var pos = posFromMouse(e, true), files = e.dataTransfer.files;
if (!pos || options.readOnly) return;
if (files && files.length && window.FileReader && window.File) {
Function createTab
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function createTab(content) {
for (var i = 0, ci; ci = content[i++];) {
var span = document.createElement("span");
span.setAttribute("tabSrc", ci.name);
span.innerHTML = ci.title;
Function split
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
String.prototype.split = function (s /* separator */, limit) {
// If separator `s` is not a regex, use the native `split`
if (!XRegExp.isRegExp(s))
return nativ.split.apply(this, arguments);