Showing 1,065 of 16,781 total issues
Function usb
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function usb()
{
$s = $this->_grabioreg('IOUSBDevice');
$lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
- 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 _ip
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function _ip()
{
if (PSI_USE_VHOST === true) {
if ((CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result)) //is server address defined
&& !strstr($result, '.') && strstr($result, ':')) { //is IPv6, quick version of preg_match('/\(([[0-9A-Fa-f\:]+)\)/', $result)
- 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 _buildNetwork
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function _buildNetwork()
{
$hideDevices = array();
$network = $this->_xml->addChild('Network');
if (defined('PSI_HIDE_NETWORK_INTERFACE')) {
- 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 list_mimetypes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function list_mimetypes()
{
global $uri, $status, $mid, $start, $type;
$mimetypes_Handler = xoops_getHandler('mimetypes');
- 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 select
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
Function _fnFilter
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart )
{
var i;
var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart );
Function _fnPageChange
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnPageChange ( oSettings, sAction )
{
var iOldStart = oSettings._iDisplayStart;
if ( sAction == "first" )
Function _fnAjaxUpdateDraw
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnAjaxUpdateDraw ( oSettings, json )
{
if ( typeof json.sEcho != 'undefined' )
{
/* Protect against old returns over-writing a new one. Possible when you get
Function raid_diskicon
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function raid_diskicon(data , id, itemid) {
var info = "";
info = data.Info;
if (info === undefined) info = "";
Method _prepare
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _prepare()
{
if ($this->_pluginName === null) {
// Figure out which OS we are running on, and detect support
if (!file_exists(PSI_APP_ROOT.'/includes/os/class.'.PSI_OS.'.inc.php')) {
Method fetchMedia
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fetchMedia($media_name, $index = null) {
/*
if ( empty( $this->extensionToMime ) ) {
*/
if ( count( $this->extensionToMime ) == 0 ) {
Function matcherFromTokens
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
Function _fnAjaxParameters
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnAjaxParameters( oSettings )
{
var iColumns = oSettings.aoColumns.length;
var aoData = [], mDataProp;
var i;
Function val
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[ 0 ];
if ( !arguments.length ) {
Function snmppinfo_getprinters
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
$("Plugins Plugin_SNMPPInfo Printer MarkerSupplies", xml).each(function snmppinfo_getprinters(id) {
var close = 0, name = "", device = "", desc = "", unit = 0, max = 0, level = 0, percent = 0, units = "", supply = 0, sunits = "";
name = $(this).parent().attr("Name");
device = $(this).parent().attr("Device");
desc = $(this).attr("Description");
Function _fnSaveState
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnSaveState ( oSettings )
{
if ( !oSettings.oFeatures.bStateSave || typeof oSettings.bDestroying != 'undefined' )
{
return;
Function _fnCreateTr
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnCreateTr ( oSettings, iRow )
{
var oData = oSettings.aoData[iRow];
var nTd;
Method _pci
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _pci()
{
if ($arrResults = Parser::lspci()) {
foreach ($arrResults as $dev) {
$this->sys->setPciDevices($dev);
Method run
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$this->_checkTemplateLanguage();
$tpl = new Template("/templates/html/index_".$this->_indexname.".html");