Showing 668 of 850 total issues
File SpotStruct_pgsql.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class SpotStruct_pgsql extends SpotStruct_abs
{
/*
File SpotInstall.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: root
Function hasUrlForSpot
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function hasUrlForSpot()
{
if ($this->alternateDownloadUrl) {
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 categoryListToSql
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
private function categoryListToSql($categoryList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$categorySql = [];
- 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
File index.php
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
//error_reporting(2147483647);
//ini_set('display_errors', 1);
Method filterValuesToSql
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function filterValuesToSql($filterValueList, $currentSession)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
// Add a list of possible text searches
File Dao_Base_User.php
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Dao_Base_User implements Dao_User
{
protected $_conn;
Function parseFull
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function parseFull($xmlStr)
{
// Create a template array so we always have the full fields to prevent ugly notices
$tpl_spot = ['category' => '', 'website' => '', 'image' => '', 'sabnzbdurl' => '', 'messageid' => '', 'searchurl' => '', 'description' => '',
'sub' => '', 'filesize' => '', 'poster' => '', 'tag' => '', 'nzb' => [], 'title' => '',
- 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 drawGraph
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawGraph(currentSpeed,interval) {
var numXLabels = 8;
var numYLabels = 5;
if($("table.sabGraphData tbody > tr").size() == 1) {
Function transition
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
transition: function( toPage, triggerData, settings ) {
var fromPage, url, pageUrl, fileUrl,
active, activeIsInitialPage,
historyDir, pageTitle, isDialog,
alreadyThere, newPageTitle,
Function updateSabPanel
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateSabPanel(start,limit) {
var baseURL = sabBaseURL();
var url = baseURL+'&action=getstatus';
$.getJSON(url, function(json){
Function cb
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cb(e) {
if (xhr.aborted || callbackProcessed) {
return;
}
try {
Consider simplifying this complex logical expression. Open
if (
// iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) ||
// Opera Mini
( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) ||
Method createTextQuery
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTextQuery($searchFields, $additionalFields)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
/*
File Services_Upgrade_Users.php
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Upgrade_Users
{
private $_dbCon;
Method spotAcat2nabcat
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function spotAcat2nabcat()
{
return [0 => // Cat0 - Image
[0 => // Z0 - Movie
[0 => '2000|2030',
Method validateSettings
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validateSettings($settings)
{
$result = new Dto_FormResult();
// Define arrays with valid settings
File Services_NzbHandler_NZBVortex.php
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_NzbHandler_NZBVortex extends Services_NzbHandler_abs
{
private $_host = null;
Method perform
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function perform($url, $lastModTime = null, $redirTries = 0)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
/*
Services_User_Record
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Services_User_Record
{
private $_sessionDao;
private $_userDao;
private $_daoFactory;