Showing 1,065 of 16,781 total issues
Function _kernel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-rvm', $ret)) {
foreach ($this->readdmesg() as $line) {
if (preg_match('/kernel: MINIX (\d+\.\d+\.\d+)\. \((.+)\)/', $line, $ar_buf)) {
- 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 _machine
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function _machine()
{
if ($lines = $this->_get_buildprop()) {
$buf = "";
if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {
- 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 __construct
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($enc)
{
parent::__construct(__CLASS__, $enc);
switch (strtolower(PSI_PLUGIN_UPDATENOTIFIER_ACCESS)) {
case 'command':
- 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 __construct
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($plugin = "")
{
parent::__construct();
if (is_string($plugin) && ($plugin !== "")) {
- 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_TypeList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- 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 upload
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function upload($chmod = 0644) {
if ($this->uploadDir == '') {
$this->setErrors( _ER_UP_UPLOADDIRNOTSET );
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 insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- 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 insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- 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 loadTests
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function loadTests()
{
$test_root = dir(__DIR__ . DIRECTORY_SEPARATOR . 'Test');
// echo "<pre>"; echo print_r($test_root, true); echo "</pre>";
- 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 renderOther
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderOther(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
$("#block_other").remove();
return;
}
Function refreshCurrent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function refreshCurrent(xml) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
$("#current").remove();
return;
}
Function refreshVoltage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function refreshVoltage(xml) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
$("#voltage").remove();
return;
}
Function genlang
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genlang(id, plugin) {
var html = "", idString = "", plugname = "",
langarrId = current_language + "_";
if (plugin === undefined) {
Function genlang
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genlang(id, plugin) {
var html = "", idString = "", plugname = "",
langarrId = current_language + "_";
if (plugin === undefined) {
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function implement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
implement: function (linkElement) {
if (!linkElement.href) {
return;
}
Function fnDeleteRow
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw )
{
/* Find settings from table node */
var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
var i, iAODataIndex;
Function renderPlugin_psstatus
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_psstatus(data) {
var directives = {
Status1: {
text: function () {
Function implement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
implement: function (linkElement) {
if (!linkElement.href) {
return;
}
Function setup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function() {
if ( rformElems.test( this.nodeName ) ) {
// IE doesn't fire change on a check/radio until blur; trigger it on click