Showing 668 of 850 total issues
Function calculateFilePath
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function calculateFilePath($cacheId, $cacheType, $metadata)
{
$filePath = $this->_cachePath.DIRECTORY_SEPARATOR;
switch ($cacheType) {
- 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 update
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update()
{
/*
* Make sure some versionnumbers are always in the db, so
* comparisons always work
SpotStruct_mysql
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class SpotStruct_mysql extends SpotStruct_abs
{
/*
* Optimize / analyze (database specific) a number of hightraffic
* tables.
SpotStruct_sqlite
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class SpotStruct_sqlite extends SpotStruct_abs
{
/*
* Optimize / analyze (database specific) a number of hightraffic
* tables.
SpotStruct_pgsql
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class SpotStruct_pgsql extends SpotStruct_abs
{
/*
* Optimize / analyze (database specific) a number of hightraffic
* tables.
Method filtersToXml
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function filtersToXml($filterList)
{
$svcSearchQP = new Services_Search_QueryParser($this->_daoFactory->getConnection());
// create the XML document
File Services_Format_Parsing.php
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Format_Parsing
{
private $_spotSigning = null;
Method updateSecurityGroups
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateSecurityGroups($forceReset)
{
// DB connectie
$dbCon = $this->_dbCon;
Function widget
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$result = new Dto_FormResult('notsubmitted');
// Make sure the user has the appropriate rights
- 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 getSpotComments
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getSpotComments($msgId, $prevMsgids, $userId, $start, $length, $language)
{
// Check users' permissions
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_view_comments, '');
- 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 oldCalculateFilePath
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function oldCalculateFilePath($cacheId, $cacheType, $metadata)
{
/*
* Get the cache id
*/
- 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 openDialog
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function openDialog(divid, title, url, buttonClick, successAction, closeCb, openCb) {
var $dialdiv = $("#" + divid);
/* submit button handler */
if (!buttonClick) {
var buttonClick = function() {
Function _applyOptions
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
_applyOptions: function( options ) {
var isCollapsed, newTheme, oldTheme, hasCorners, hasIcon,
elem = this.element,
currentOpts = this._renderedOptions,
ui = this._ui,
Dao_Base_User
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class Dao_Base_User implements Dao_User
{
protected $_conn;
/*
Method compressCategorySelection
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compressCategorySelection($categoryList, $strongNotList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$compressedList = '';
Method getSpots
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSpots($ourUserId, $pageNr, $limit, $parsedSearch)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$offset = (int) $pageNr * (int) $limit;
Function load
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function( url, options ) {
// This function uses deferred notifications to let callers
// know when the content is done loading, or if an error has occurred.
var deferred = ( options && options.deferred ) || $.Deferred(),
Function spotEditLoadCategoryIntoSelectbox
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function spotEditLoadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear, subcategory) {
if (typeof subcategory == "undefined") { subcategory = new Array(); }
var $selectbox = $("#" + selectId);
if (titleElm) {
- 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 cookie
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
jQuery.cookie = function (key, value, options) {
// key and value given, set cookie...
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
options = jQuery.extend({}, options);
- 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"