Showing 1,065 of 16,781 total issues
Function _temperature
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _temperature()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Temperature'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Temperature')))
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
$_wmi = null;
try {
- 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 _kernel
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {
$result = $strBuf;
if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {
- 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 _buildPlugins
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _buildPlugins()
{
$pluginroot = $this->_xml->addChild("Plugins");
if (($this->_plugin_request || $this->_complete_request) && count($this->_plugins) > 0) {
$plugins = 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 _parse_log_file
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private static function _parse_log_file($string)
{
global $log_file;
if (file_exists($log_file)) {
$contents = @file_get_contents($log_file);
- 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 html
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
html: function () {
var processes = "", p111 = 0, p112 = 0, p113 = 0, p114 = 0, p115 = 0, p116 = 0;
var not_first = false;
processes = parseInt(this.Processes);
if (this.ProcessesRunning !== undefined) {
Method _fans
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _fans($hwpath)
{
$sensor = glob($hwpath."fan*_input", GLOB_NOSORT);
if (is_array($sensor) && (($total = count($sensor)) > 0)) {
$buf = "";
Method _cpuinfo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _cpuinfo()
{
$ncpu = 0;
$tcpu = "";
$vcpu = "";
Method upload
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function upload($chmod = 0644) {
if ($this->uploadDir == '') {
$this->setErrors( _ER_UP_UPLOADDIRNOTSET );
return false;
}
Method getUnixId
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
Function adjustCSS
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted,
scale = 1,
maxIterations = 20,
currentValue = tween ?
Function getLanguage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getLanguage(plugin, langarrId) {
var getLangUrl = "";
if (current_language) {
getLangUrl = 'language/language.php?lang=' + current_language;
if (plugin) {
Function aTypes
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ( sData )
{
/* Allow zero length strings as a number */
if ( typeof sData == 'number' )
{
Function load
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn.load = function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
}
Function setOffset
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
Function fnAddData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fnAddData = function( mData, bRedraw )
{
if ( mData.length === 0 )
{
return [];
Method _kernel
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _kernel()
{
$result = "";
if (CommonFunctions::executeProgram($uname="uptrack-uname", '-r', $strBuf, false) || // show effective kernel if ksplice uptrack is installed
CommonFunctions::executeProgram($uname="uname", '-r', $strBuf, PSI_DEBUG)) {
Method _uptime
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _uptime()
{
$result = 0;
date_default_timezone_set('UTC');
$buffer = $this->_get_Win32_OperatingSystem();
Method getWMI
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getWMI($wmi, $strClass, $strValue = array())
{
$arrData = array();
if (gettype($wmi) === "object") {
$value = "";
Method edit_mimetypes
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function edit_mimetypes()
{
global $status, $mid, $start;
$mime_id = isset($_REQUEST['mime_id']) ? (int)$_REQUEST['mime_id'] : 0;