Showing 850 of 850 total issues
File jquery.mobile-1.4.5.js
has 10421 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Mobile 1.4.5
* Git HEAD hash: 68e55e78b292634d3991c795f06f5e37a512decc <> Date: Fri Oct 31 2014 17:33:30 UTC
* http://jquerymobile.com
*
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function addSpots($spots, $fullSpots = [])
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
foreach ($spots as &$spot) {
/*
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 633.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function addSpots($spots, $fullSpots = [])
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
foreach ($spots as &$spot) {
/*
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 633.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function compressCategorySelection
has a Cognitive Complexity of 157 (exceeds 5 allowed). Consider refactoring. Open
public function compressCategorySelection($categoryList, $strongNotList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$compressedList = '';
- 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 address
has 619 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.address = (function () {
var _trigger = function(name) {
var ev = $.extend($.Event(name),
(function() {
File scripts.js
has 1090 lines of code (exceeds 250 allowed). Consider refactoring. Open
$.address.init(function() {
$('.spotlink').address();
}).externalChange(
function(event) {
basePATH = location.href.replace('#' + $.address.value(), '');
Function process
has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring. Open
public function process($hdrList, $curArtNr, $increment, $timer)
{
$this->displayStatus('progress', $curArtNr.' till '.$increment);
$signedCount = 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 ajaxSubmit
has 504 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.ajaxSubmit = function(options) {
/*jshint scripturl:true */
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
if (!this.length) {
Function categoriesToJson
has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring. Open
public function categoriesToJson()
{
/*
* Don't allow the tree to be cached, it contains the current state of the
* tree
- 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 SpotPage_newznabapi.php
has 887 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class SpotPage_newznabapi extends SpotPage_Abs
{
private $_params;
Function createTextQuery
has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring. Open
public function createTextQuery($searchFields, $additionalFields)
{
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
Method updateSchema
has 384 lines of code (exceeds 25 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');
Function search
has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring. Open
public function search($outputtype)
{
// Check users' permissions
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_perform_search, '');
- 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
SpotTemplateHelper
has 98 functions (exceeds 20 allowed). Consider refactoring. Open
class SpotTemplateHelper
{
protected $_settings;
protected $_daoFactory;
protected $_currentSession;
File jquery.form.js
has 779 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Form Plugin
* version: 3.15 (09-SEP-2012)
* @requires jQuery v1.3.2 or later
*
Function prepareCategorySelection
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
public function prepareCategorySelection($dynaList)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$strongNotList = [];
- 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 SpotTemplateHelper.php
has 738 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// Utility class voor template functies, kan eventueel
// door custom templates extended worden
use function PHP81_BC\strftime;
Function fileUploadIframe
has 337 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fileUploadIframe(a) {
var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
var useProp = !!$.fn.prop;
if ($(':input[name=submit],:input[id=submit]', form).length) {
Similar blocks of code found in 4 locations. Consider refactoring. Open
function processImage($tplHelper, $count_newspots, $filterList, $defaultSortField)
{
$selfUrl = $tplHelper->makeSelfUrl('path');
foreach ($filterList as $filter) {
$imageFilter = $tplHelper->getPageUrl('index').'&search[tree]='.$filter['tree'];
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 356.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
function processSounds($tplHelper, $count_newspots, $filterList, $defaultSortField)
{
$selfUrl = $tplHelper->makeSelfUrl('path');
foreach ($filterList as $filter) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 356.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76