Showing 668 of 850 total issues
Method fetchSpotImage
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetchSpotImage($fullSpot)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$return_code = 0;
$validImage = false;
File sabpanel.js
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
// SabNZBd actions
function sabBaseURL() {
var apikey = $("div.sabnzbdPanel input.apikey").val();
return createBaseURL()+'?page=nzbhandlerapi&nzbhandlerapikey='+apikey;
}
Consider simplifying this complex logical expression. Open
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
(t == 'checkbox' || t == 'radio') && !el.checked ||
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
tag == 'select' && el.selectedIndex == -1)) {
return null;
Function sha1
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
sha1: function(string) {
var blockstart;
var i, j;
var W = new Array(80);
var H0 = 0x67452301;
Method updateUserPreferences
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateUserPreferences()
{
$userList = $this->_userDao->getUserList();
// loop through every user and fix it
File jquery.ui.nestedSortable.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery UI Nested Sortable
* v 1.3.5 / 21 jun 2012
* http://mjsarfatti.com/code/nestedSortable
*
Function refresh
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function( create ) {
var buttonClass, pos, numli, item, itemClass, itemTheme, itemIcon, icon, a,
isDivider, startCount, newStartCount, value, last, splittheme, splitThemeClass, spliticon,
altButtonClass, dividerTheme, li,
o = this.options,
Function build
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
build: function() {
var selectId, popupId, dialogId, label, thisPage, isMultiple, menuId,
themeAttr, overlayTheme, overlayThemeAttr, dividerThemeAttr,
menuPage, listbox, list, header, headerTitle, menuPageContent,
menuPageClose, headerClose,
File Services_Providers_Http.php
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Providers_Http
{
private $_cacheDao;
Function getColumnInfo
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function getColumnInfo($tablename, $colname)
{
$q = $this->_dbcon->arrayQuery("SELECT COLUMN_NAME,
COLUMN_DEFAULT,
IS_NULLABLE,
- 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 bmp2gd
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function bmp2gd($src, $dest = false)
{
/*** try to open the file for reading ***/
if (!($src_f = fopen($src, 'rb'))) {
return false;
- 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 displayStatus
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function displayStatus($cat, $txt)
{
switch ($cat) {
case 'start': echo 'Retrieving new Spots from server '.$txt.'...'.PHP_EOL;
break;
- 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 _load
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
_load = function() {
if (!_loaded) {
_loaded = TRUE;
_options();
var complete = function() {
Function openDialog
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function openDialog(divid, title, url, buttonClick, successAction, closeCb, openCb) {
var $dialdiv = $("#" + divid);
/*
* Test whether we need to 'dialog'-ify the
Method render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
// Make sure the proper permissions are met
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_view_spotdetail, '');
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_view_spots_index, '');
Function toJSON
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
: function( o ) {
if ( o === null ) {
return 'null';
}
Function renderSelectBox
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function renderSelectBox()
{
/*
* The categorylisting is very static, so ask the user to always cache
*/
- 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 showNotificationOptions
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function showNotificationOptions($provider, $edituserprefsform, $tplHelper)
{
echo '<fieldset>'.PHP_EOL;
if ($tplHelper->allowed(SpotSecurity::spotsec_send_notifications_types, 'watchlist_handled') && $tplHelper->allowed(SpotSecurity::spotsec_keep_own_watchlist, '')) {
- 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 xmlToFilters
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function xmlToFilters($xmlStr)
{
$filterList = [];
/*
- 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 verifyCategories
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function verifyCategories(Dto_FormResult $result)
{
$spot = $result->getData('spot');
/* Make sure the category is valid
- 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"