Showing 9,653 of 9,653 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- 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 58.
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
if ( arguments.length || typeof this._options.picasa !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
return;
}
- 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 58.
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
if ( arguments.length || typeof this._options.flickr !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
return;
}
- 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 58.
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
Method updateBlock
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
Function _getWH
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getWH : function() {
var $container = this.$( 'container' ),
$target = this.$( 'target' ),
self = this,
Function _getWH
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getWH : function() {
var $container = this.$( 'container' ),
$target = this.$( 'target' ),
self = this,
Function historyInit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
historyInit: function(callback, src){
jQuery.historyCallback = callback;
if (src) jQuery.historyIframeSrc = src;
var current_hash = location.hash.replace(/\?.*$/, '');
Function _initKeys
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _initKeys( $wrpr, opts )
{
if ( opts.prev.key || opts.next.key || opts.close.key )
{
$(document).bind(
Method extgallery_tag_iteminfo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extgallery_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
Method staticPushErrorHandling
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function staticPushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
$def_mode = &$GLOBALS['_PEAR_default_error_mode'];
$def_options = &$GLOBALS['_PEAR_default_error_options'];
Method get_image_url
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_image_url()
{
// Get the image file path
if (!mb_strlen($this->path)) {
return $this->url;
Method _dirToStruct
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
{
$struct = ['dirs' => [], 'files' => []];
if (false === ($dir = @opendir($sPath))) {
if (!$silent) {
Method rotate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rotate($angle, $options = null)
{
if (!($angle == $this->_rotation_angle($angle))) {
// No rotation needed
return true;
Method PclTarDelete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
$v_result = 1;
Method PclTarExtractList
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
$v_result = 1;
Method PclTarUpdate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
$v_result = 1;
Method getMax
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getMax(\CriteriaElement $criteria = null, $max = '*')
{
$field = '';
$groupby = false;
if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
Method render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$ele_name = $this->getName();
echo '<table class="outer"><tr><td class="odd"><table><tr>';
$cols = 1;
Method getSum
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSum(\CriteriaElement $criteria = null, $sum = '*')
{
$field = '';
$groupby = false;
if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
Identical blocks of code found in 2 locations. Consider refactoring. Open
toggleFullscreen: function( callback ) {
this._fullscreen[ this.isFullscreen() ? 'exit' : 'enter'].apply( this, Utils.array( arguments ) );
return this;
},
- 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 57.
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