Showing 334 of 371 total issues
Avoid too many return
statements within this method. Open
return TRUE;
Avoid too many return
statements within this method. Open
return TRUE;
Avoid too many return
statements within this method. Open
return $new_metafiles;
Avoid too many return
statements within this method. Open
return FALSE;
Avoid too many return
statements within this method. Open
return FALSE;
Avoid too many return
statements within this method. Open
return $result;
Avoid too many return
statements within this method. Open
return 1;
Avoid too many return
statements within this method. Open
return TRUE;
Avoid too many return
statements within this method. Open
return 0;
Function getTreemapColor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getTreemapColor(value, min, max) {
value = parseInt(value);
min = parseInt(min);
max = parseInt(max);
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function run() {
echo "\nIs the specified drive still available? ";
if (is_dir("$this->drive/.gh_metastore/")) {
echo "(It looks like it is.)\n";
} else {
- 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 filter_lines_for_section
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function filter_lines_for_section($lines, $section) {
// Filter to keep only the correct [section]
$found_section = FALSE;
foreach ($lines as $i => $line) {
if (preg_match('/\[(.+)]/', $line, $re)) {
- 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 getFsckParams
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getFsckParams() {
let params = {};
let s = $('#id_l2_actions_fsck').find('input, select').serialize();
let parsedParams = parseParams(s);
for (let name in parsedParams) {
- 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 getFilesystemDetails
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getFilesystemDetails($debug_tasks) {
$this->log();
$this->log("From filesystem");
$this->log("===============");
- 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 gh_error_handler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function gh_error_handler($errno, $errstr, $errfile, $errline, $errcontext = NULL) {
if(!($errno & error_reporting())) {
// Ignored (@) warning
return TRUE;
}
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
function __construct($options, $cli_command) {
parent::__construct($options, $cli_command);
if (isset($this->options['dir'])) {
$this->dir = $this->options['dir'];
- 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 changedTab
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function changedTab(el, first, replace) {
if (skip_changed_tab_event) {
skip_changed_tab_event = false;
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 fetch_next_tasks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_next_tasks($incl_md5, $update_idle, $include_written = TRUE) {
$where_clause = "";
if (!empty($this->locked_shares)) {
$where_clause .= " AND share NOT IN ('" . implode("','", array_keys($this->locked_shares)) . "')";
}
- 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 getActionCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getActionCommand($command_line_options) {
foreach ($this->cliCommandsDefinitions as $def) {
$param = $def->paramSpecified($command_line_options);
if ($param !== FALSE) {
if ($param !== TRUE) {
- 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 is_share_sticky
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function is_share_sticky($share_name) {
$sticky_files = Config::get(CONFIG_STICKY_FILES);
if (!empty($sticky_files)) {
foreach ($sticky_files as $share_dir => $stick_into) {
if (string_starts_with($share_dir, $share_name)) {
- 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"