Showing 668 of 850 total issues
Function parse
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function parse($locale, $domain)
{
$this->translationTable[$locale][$domain] = [];
$mofile = sprintf('%s/%s/LC_MESSAGES/%s.mo', $this->dir, $locale, $domain);
$cachefile = sprintf('%s/%s/LC_MESSAGES/%s.ser', $this->dir, $locale, $domain);
- 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 filters.inc.php
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
SpotTiming::start('tpl:filters');
// We definieeren hier een aantal settings zodat we niet steeds dezelfde check hoeven uit te voeren
$count_newspots = ($currentSession['user']['prefs']['count_newspots']);
Method categoriesToJson
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function categoriesToJson()
{
/*
* Don't allow the tree to be cached, it contains the current state of the
* tree
File spots.inc.php
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* Render de header en filter templates */
if (!isset($data['spotsonly'])) {
require_once __DIR__.'/includes/header.inc.php';
Method prepareCategorySelection
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepareCategorySelection($dynaList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$strongNotList = [];
Function render
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
// Make sure the user has the appropriate permissions
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_use_sabapi, '');
- 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 converttoubb
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function converttoubb($parseresult, $allowedchildren = [null])
{
$output = [''];
$bodycount = 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 fetchSpotImage
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function fetchSpotImage($fullSpot)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$return_code = 0;
$validImage = 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
Method askNntpSettings
has 93 lines of code (exceeds 25 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
Method parseFull
has 92 lines of code (exceeds 25 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' => '',
Method bmp2gd
has 91 lines of code (exceeds 25 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;
Function openDialog
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function openDialog(divid, title, url, buttonClick, successAction, closeCb, openCb) {
var $dialdiv = $("#" + divid);
/* submit button handler */
if (!buttonClick) {
var buttonClick = 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 strongNotListToSql
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
private function strongNotListToSql($strongNotList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$strongNotSql = [];
- 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 updateExternalList
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function updateExternalList($newlist, $idtype)
{
$updatelist = [];
$updskipped = 0;
$countnewlistspotterid = 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
Method render
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
// Make sure the user has the appropriate permissions
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_use_sabapi, '');
Dao_Base_Spot
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class Dao_Base_Spot implements Dao_Spot
{
protected $_conn;
/*
Method render
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$result = new Dto_FormResult('notsubmitted');
// Make sure the user has the appropriate rights
Function SpotPosting
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function SpotPosting() {
this.commentForm = null;
this.reportForm = null;
this.uiStart = null;
this.uiDone = 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 sendMessages
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function sendMessages($userId)
{
$userDao = $this->_daoFactory->getUserDao();
$notificationDao = $this->_daoFactory->getNotificationDao();
- 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 _buildList
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildList: function() {
var self = this,
o = this.options,
placeholder = this.placeholder,
needPlaceholder = true,