Showing 1,990 of 25,678 total issues
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Function BloomPass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
strength = ( typeof strength !== "undefined" ) ? strength : 1;
kernelSize = ( typeof kernelSize !== "undefined" ) ? kernelSize : 25;
sigma = ( typeof sigma !== "undefined" ) ? sigma : 4.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 UberVizMain
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var UberVizMain = (function() {
var stats;
var windowHalfX;
var windowHalfY;
- 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 displayNotification
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function displayNotification(message, timeout) {
if (notificationTimeout !== null || !message) {
clearNotification();
}
- 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 15
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
},{}],15:[function(require,module,exports){
/**
* Makes a multidimensional array
*/
exports.makeArray = function(lengths, Type) {
- 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 easeInOutElastic
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
easeInOutElastic(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t===0) {return b;} if ((t/=d/2)===2) {return b+c;} if (!p) {p=d*(.3*1.5);}
if (a < Math.abs(c)) { a=c; var s=p/4; }
else { var s = p/(2*Math.PI) * Math.asin (c/a); }
- 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_artist_info
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function get_artist_info($artist_id): array
{
$artist = new Artist($artist_id);
$query = ($artist->mbid)
? 'mbid=' . rawurlencode($artist->mbid)
- 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 find_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function find_template($template, bool $extern = false): string
{
$path = AmpConfig::get('theme_path') . '/templates/' . $template;
$realpath = __DIR__ . '/../../../public/' . $path;
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
- 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 show_footer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function show_footer(): void
{
if (!defined("TABLE_RENDERED")) {
show_table_render();
}
- 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 prepare_metadata_for_writing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function prepare_metadata_for_writing($frames): array
{
$ndata = array();
foreach ($frames as $key => $text) {
switch ($key) {
- 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 setupCurl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function setupCurl(): Curl
{
$proxyHost = $this->config->get(ConfigurationKeyEnum::PROXY_HOST);
$proxyPort = $this->config->get(ConfigurationKeyEnum::PROXY_PORT);
$proxyUser = $this->config->get(ConfigurationKeyEnum::PROXY_USER);
- 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_user_sql_where
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function get_user_sql_where(
$user_id = 0,
$object_type = null,
$object_id = 0,
$start_date = null,
- 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 clean_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function clean_file($file, $media_type = 'song'): bool
{
$file_info = Core::get_filesize(Core::conv_lc_file($file));
if ($file_info < 1) {
$object_id = Catalog::get_id_from_file($file, $media_type);
- 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_users
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function get_users($filter): array
{
switch ($filter) {
case 'users':
$sql = "SELECT * FROM `user` WHERE `access`='25' AND `email` IS NOT NULL";
- 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 cdata
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function cdata($parser, $cdata)
{
$tag = $this->_currentTag;
$subtag = $this->_subTag;
$source = $this->_sourceTag;
- 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 getDisabledMetadataFields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getDisabledMetadataFields(): array
{
if ($this->disabledMetadataFields === null) {
$disabledFieldNames = [];
- 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"