Showing 668 of 850 total issues
File Services_User_Record.php
has 564 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_User_Record
{
private $_sessionDao;
Function process
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public function process($hdrList, $curArtNr, $increment, $timer)
{
$this->displayStatus('progress', $curArtNr.' till '.$increment);
$lastProcessedId = '';
- 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 edituserprefs.inc.php
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require __DIR__.'/includes/form-messages.inc.php';
$pagetitle = _('Change user preferences');
File SpotStruct_abs.php
has 540 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
abstract class SpotStruct_abs
{
protected $_dbcon;
File SpotCategories.php
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class SpotCategories
{
private static $_namesTranslated = false;
File Services_Search_QueryParser.php
has 532 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Search_QueryParser
{
/*
Function showResults
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function showResults($spots, $offset, $outputtype)
{
$nzbhandling = $this->_currentSession['user']['prefs']['nzbhandling'];
if ($outputtype == 'json') {
- 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 filterValuesToSql
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
private function filterValuesToSql($filterValueList, $currentSession)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
// Add a list of possible text searches
- 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 updateSchema
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public function updateSchema()
{
// Drop any older (not used anymore) FTS indexes on the spots full table
$this->dropIndex('idx_spotsfull_fts_1', 'spotsfull');
$this->dropIndex('idx_spotsfull_fts_2', 'spotsfull');
- 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 perform
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function perform($url, $lastModTime = null, $redirTries = 0)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
/*
- 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 _registerInternalEvents
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.mobile._registerInternalEvents = function() {
var getAjaxFormData = function( $form, calculateOnly ) {
var url, ret = true, formData, vclickedName, method;
if ( !$.mobile.ajaxEnabled ||
// test that the form is, itself, ajax false
Function validateUserPreferences
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function validateUserPreferences($prefs, $currentPrefs)
{
$result = new Dto_FormResult();
// Define several arrays with valid settings
- 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
Method search
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function search($outputtype)
{
// Check users' permissions
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_perform_search, '');
File Dao_Base_Cache.php
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Dao_Base_Cache implements Dao_Cache
{
private $_cachePath = '';
Function askNntpSettings
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public static function askNntpSettings()
{
global $settings;
// Loading the file directly seems to sometimes result in a weird error. GH issue #1861
- 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 SpotPosting
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SpotPosting() {
this.commentForm = null;
this.reportForm = null;
this.uiStart = null;
this.uiDone = null;
Method parseHeader
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseHeader($subj, $from, $date, $messageid, $rsaKeys)
{
// Initialize an empty array, we create a basic template in a few
$spot = [];
Method showResults
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showResults($spots, $offset, $outputtype)
{
$nzbhandling = $this->_currentSession['user']['prefs']['nzbhandling'];
if ($outputtype == 'json') {
Function updateUserRecord
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function updateUserRecord($user, array $groupList, $allowEditGroupMembership)
{
$result = new Dto_FormResult('success');
$spotUser = $this->getUser($user['userid']);
- 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 Services_Retriever_Spots.php
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Retriever_Spots extends Services_Retriever_Base
{
/**