Showing 1,065 of 16,781 total issues
Function distro
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function distro()
{
$this->sys->setDistributionIcon('Darwin.png');
if (!CommonFunctions::executeProgram('system_profiler', 'SPSoftwareDataType', $buffer, PSI_DEBUG)) {
parent::distro();
- 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 _trace
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function _trace($strMessage)
{
$arrTrace = array_reverse(debug_backtrace());
$strFunc = '';
$strBacktrace = htmlspecialchars($strMessage)."\n\n";
- 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 getDocker
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function getDocker()
{
$result = array();
$i = 0;
- 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 full_addr
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function full_addr(ip_string) {
var wrongvalue = false;
ip_string = $.trim(ip_string).toLowerCase();
// ipv4 notation
if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
Function full_addr
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function full_addr(ip_string) {
var wrongvalue = false;
ip_string = $.trim(ip_string).toLowerCase();
// ipv4 notation
if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
Function _fnLoadState
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnLoadState ( oSettings, oInit )
{
if ( !oSettings.oFeatures.bStateSave )
{
return;
Method getDocker
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDocker()
{
$result = array();
$i = 0;
File mimetypes.php
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
/**
XoopsMediaUploader
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class XoopsMediaUploader {
/**
* Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
**/
var $allowUnknownTypes = false;
Function remove
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
remove: function( elem, types, handler, selector, mappedTypes ) {
var j, handleObj, tmp,
origCount, t, events,
special, handlers, type,
namespaces, origType,
Function fnUpdate
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
{
var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
var iVisibleColumn, i, iLen, sDisplay;
var iRow = (typeof mRow == 'object') ?
Function fnInit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
"fnInit": function ( oSettings, nPaging, fnCallbackDraw )
{
var nFirst = document.createElement( 'span' );
var nPrevious = document.createElement( 'span' );
var nList = document.createElement( 'span' );
Method _devicelist
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _devicelist($strType)
{
if (empty($this->_wmidevices)) {
if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
$this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));
Method _cpuinfo
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
Method rfts
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function rfts($strFileName, &$strRet, $intLines = 0, $intBytes = 4096, $booErrorRep = true)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$out = self::_parse_log_file("Reading: ".$strFileName);
if ($out == false) {
Method insert
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
File read_config.php
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('PSI_CONFIG_FILE')) {
/**
* phpSysInfo version
*/
Function _fnColumnOptions
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnColumnOptions( oSettings, iCol, oOptions )
{
var oCol = oSettings.aoColumns[ iCol ];
/* User specified column options */
Function _showBackdrop
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
Function fileType
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fileType() {
var from = currentSettings.from;
var url;