Showing 506 of 851 total issues
Function LoadDict
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function LoadDict($maindic = '')
{
$startt = microtime(true);
//正常读取文件
$dicAddon = $this->addonDicFile;
- 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 addOrEnqueueAnAddress
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function addOrEnqueueAnAddress($kind, $address, $name)
{
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (($pos = strrpos($address, '@')) === 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 get_lines
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function get_lines()
{
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
- 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 getMailMIME
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getMailMIME()
{
$result = '';
$ismultipart = true;
switch ($this->message_type) {
- 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 utf8CharBoundary
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function utf8CharBoundary($encodedText, $maxLength)
{
$foundSplitPos = false;
$lookBack = 3;
while (!$foundSplitPos) {
- 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 getImageData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
getImageData: function () {
var _this = this;
if(!_this.listEnd && !this.isLoadingData) {
this.isLoadingData = true;
Function getImageData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
getImageData: function () {
var _this = this;
if(!_this.listEnd && !this.isLoadingData) {
this.isLoadingData = true;
Function init
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
init:function () {
var colorPiker = new UE.ui.ColorPicker({
editor:editor
}),
colorPop = new UE.ui.Popup({
Function ShowNotification
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ShowNotification(NewMessageNumber) {
if (NewMessageNumber > 0) {
document.title = '(' + Lang['New_Message'].replace('{{NewMessage}}', NewMessageNumber) + ')' + document.title.replace(new RegExp(('\\(' + Lang['New_Message'] + '\\)').replace('{{NewMessage}}', '\\d+'), "g"), '');
$("#MessageNumber").css("visibility", "visible");
$("#MessageNumber").html(NewMessageNumber);
Function pushData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
pushData: function (list) {
var i, item, img, filetype, preview, icon, _this = this,
urlPrefix = editor.getOpt('fileManagerUrlPrefix');
for (i = 0; i < list.length; i++) {
if(list[i] && list[i].url) {
Function _renderTemplate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderTemplate:function (data) {
var me = this;
if (data.length == 0)return '<div class="empty">' + lang.emptyTxt + '</div>';
data = me._rebuildData(data);
var s = [], p = [], t = [];
Function exec
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function exec(scrawlObj) {
if (scrawlObj.isScrawl) {
addMaskLayer(lang.scrawlUpLoading);
var base64 = scrawlObj.getCanvasData();
if (!!base64) {
Method XssEscape
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function XssEscape($html)
{
$filter = new WhiteHTMLFilter();
$urlFilter = function($url) {
$token = parse_url($url);
Method checkIdenticalFiles
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkIdenticalFiles($tempFileName, $inputType)
{
if ($this->DB) {
if ($inputType == 'string') {
$this->fileMD5 = md5($tempFileName);
Function patchDisplay
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function patchDisplay(from, to, intact) {
// The first pass removes the DOM nodes that aren't intact.
if (!intact.length) lineDiv.innerHTML = "";
else {
function killNode(node) {
Function tokenBase
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
else if (ch == "/" && stream.eat("*")) {
state.tokenize = tokenCComment;
Method getMailMIME
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getMailMIME()
{
$result = '';
$ismultipart = true;
switch ($this->message_type) {
Method parseAddresses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseAddresses($addrstr, $useimap = true)
{
$addresses = array();
if ($useimap and function_exists('imap_rfc822_parse_adrlist')) {
//Use this built-in parser if it's available
Method post_request
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function post_request($url, $postdata = '') {
if (!$postdata) {
return false;
}
Method Pagination
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Pagination($PageUrl, $CurrentPage, $TotalPage)
{
if ($TotalPage <= 1)
return false;
global $Config, $Lang;