TeaThemeOptions/TeaThemeOptions

View on GitHub

Showing 65 of 177 total issues

Similar blocks of code found in 18 locations. Consider refactoring.
Open

    $.fn.olBackground = function (method){
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        }
        else if (typeof method === 'object' || !method) {
Severity: Major
Found in src/Resources/assets/js/background/background.js and 17 other locations - About 4 hrs to fix
src/Resources/assets/js/checkall/checkall.js on lines 107..118
src/Resources/assets/js/checkit/checkit.js on lines 88..99
src/Resources/assets/js/code/code.js on lines 131..142
src/Resources/assets/js/color/color.js on lines 109..120
src/Resources/assets/js/date/date.js on lines 80..91
src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
src/Resources/assets/js/link/link.js on lines 165..176
src/Resources/assets/js/maps/maps.js on lines 273..284
src/Resources/assets/js/modal/modal.js on lines 99..110
src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
src/Resources/assets/js/range/range.js on lines 74..85
src/Resources/assets/js/social/social.js on lines 234..245
src/Resources/assets/js/textarea/textarea.js on lines 78..89
src/Resources/assets/js/toggle/toggle.js on lines 76..87
src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
src/Resources/assets/js/upload/upload.js on lines 261..272
src/Resources/assets/js/youtube/youtube.js on lines 192..203

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 127.

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

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

    $.fn.olRange = function (method){
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        }
        else if (typeof method === 'object' || !method) {
Severity: Major
Found in src/Resources/assets/js/range/range.js and 17 other locations - About 4 hrs to fix
src/Resources/assets/js/background/background.js on lines 123..134
src/Resources/assets/js/checkall/checkall.js on lines 107..118
src/Resources/assets/js/checkit/checkit.js on lines 88..99
src/Resources/assets/js/code/code.js on lines 131..142
src/Resources/assets/js/color/color.js on lines 109..120
src/Resources/assets/js/date/date.js on lines 80..91
src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
src/Resources/assets/js/link/link.js on lines 165..176
src/Resources/assets/js/maps/maps.js on lines 273..284
src/Resources/assets/js/modal/modal.js on lines 99..110
src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
src/Resources/assets/js/social/social.js on lines 234..245
src/Resources/assets/js/textarea/textarea.js on lines 78..89
src/Resources/assets/js/toggle/toggle.js on lines 76..87
src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
src/Resources/assets/js/upload/upload.js on lines 261..272
src/Resources/assets/js/youtube/youtube.js on lines 192..203

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 127.

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

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

    $.fn.olDate = function (method){
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        }
        else if (typeof method === 'object' || !method) {
Severity: Major
Found in src/Resources/assets/js/date/date.js and 17 other locations - About 4 hrs to fix
src/Resources/assets/js/background/background.js on lines 123..134
src/Resources/assets/js/checkall/checkall.js on lines 107..118
src/Resources/assets/js/checkit/checkit.js on lines 88..99
src/Resources/assets/js/code/code.js on lines 131..142
src/Resources/assets/js/color/color.js on lines 109..120
src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
src/Resources/assets/js/link/link.js on lines 165..176
src/Resources/assets/js/maps/maps.js on lines 273..284
src/Resources/assets/js/modal/modal.js on lines 99..110
src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
src/Resources/assets/js/range/range.js on lines 74..85
src/Resources/assets/js/social/social.js on lines 234..245
src/Resources/assets/js/textarea/textarea.js on lines 78..89
src/Resources/assets/js/toggle/toggle.js on lines 76..87
src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
src/Resources/assets/js/upload/upload.js on lines 261..272
src/Resources/assets/js/youtube/youtube.js on lines 192..203

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 127.

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

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

    $.fn.olUpload = function (method){
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        }
        else if (typeof method === 'object' || !method) {
Severity: Major
Found in src/Resources/assets/js/upload/upload.js and 17 other locations - About 4 hrs to fix
src/Resources/assets/js/background/background.js on lines 123..134
src/Resources/assets/js/checkall/checkall.js on lines 107..118
src/Resources/assets/js/checkit/checkit.js on lines 88..99
src/Resources/assets/js/code/code.js on lines 131..142
src/Resources/assets/js/color/color.js on lines 109..120
src/Resources/assets/js/date/date.js on lines 80..91
src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
src/Resources/assets/js/link/link.js on lines 165..176
src/Resources/assets/js/maps/maps.js on lines 273..284
src/Resources/assets/js/modal/modal.js on lines 99..110
src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
src/Resources/assets/js/range/range.js on lines 74..85
src/Resources/assets/js/social/social.js on lines 234..245
src/Resources/assets/js/textarea/textarea.js on lines 78..89
src/Resources/assets/js/toggle/toggle.js on lines 76..87
src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
src/Resources/assets/js/youtube/youtube.js on lines 192..203

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 127.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    var methods = {
        init: function (options){
            if (!this.length) {
                return false;
            }
Severity: Major
Found in src/Resources/assets/js/toggle/toggle.js and 2 other locations - About 4 hrs to fix
src/Resources/assets/js/color/color.js on lines 86..107
src/Resources/assets/js/modal/modal.js on lines 76..97

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 120.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    var methods = {
        init: function (options){
            if (!this.length) {
                return false;
            }
Severity: Major
Found in src/Resources/assets/js/modal/modal.js and 2 other locations - About 4 hrs to fix
src/Resources/assets/js/color/color.js on lines 86..107
src/Resources/assets/js/toggle/toggle.js on lines 53..74

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 120.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    var methods = {
        init: function (options){
            if (!this.length) {
                return false;
            }
Severity: Major
Found in src/Resources/assets/js/color/color.js and 2 other locations - About 4 hrs to fix
src/Resources/assets/js/modal/modal.js on lines 76..97
src/Resources/assets/js/toggle/toggle.js on lines 53..74

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 120.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                $index->create(array(
                    'number_of_shards' => 4,
                    'number_of_replicas' => 1,
                    'analysis' => array(
                        'analyzer' => array(
Severity: Major
Found in src/Plugins/Search/SearchElastica.php and 1 other location - About 3 hrs to fix
src/Plugins/Search/SearchElastica.php on lines 394..418

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 148.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                $index->create(array(
                    'number_of_shards' => 4,
                    'number_of_replicas' => 1,
                    'analysis' => array(
                        'analyzer' => array(
Severity: Major
Found in src/Plugins/Search/SearchElastica.php and 1 other location - About 3 hrs to fix
src/Plugins/Search/SearchElastica.php on lines 338..362

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 148.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        $.each(_ol.$el.find(_ol.options.items), function (){
            _ol.$modal.find('a[data-nk="' + $(this).attr('data-nk') + '"]').addClass(_ol.options.active);
        });
Severity: Major
Found in src/Resources/assets/js/social/social.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/social/social.js on lines 72..74

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 92.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        $.each(_ol.$el.find(_ol.options.items), function (){
            _ol.$modal.find('a[data-nk="' + $(this).attr('data-nk') + '"]').addClass(_ol.options.active);
        });
Severity: Major
Found in src/Resources/assets/js/social/social.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/social/social.js on lines 56..58

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 92.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    var methods = {
        init: function (){
            if (!this.length) {
                return false;
            }
Severity: Major
Found in src/Resources/assets/js/textarea/textarea.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/range/range.js on lines 60..72

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 81.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    var methods = {
        init: function (){
            if (!this.length) {
                return false;
            }
Severity: Major
Found in src/Resources/assets/js/range/range.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/textarea/textarea.js on lines 64..76

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 81.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function addTerm($configs = array())
    {
        //Admin panel
        if (!OLZ_ISADMIN) {
            return;
Severity: Major
Found in src/Core/Term/TermEngine.php and 1 other location - About 2 hrs to fix
src/Core/PostType/PosttypeEngine.php on lines 71..94

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 126.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function addPostType($configs = array())
    {
        //Admin panel
        if (!OLZ_ISADMIN) {
            return;
Severity: Major
Found in src/Core/PostType/PosttypeEngine.php and 1 other location - About 2 hrs to fix
src/Core/Term/TermEngine.php on lines 59..82

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 126.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if ('top' == _ol.options.position) {
            _ol.$tooltip.addClass('arrow-bottom');

            //top
            return {
Severity: Major
Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/tooltip/tooltip.js on lines 153..179

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 77.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        else if ('bottom' == _ol.options.position) {
            _ol.$tooltip.addClass('arrow-top');

            //bottom
            return {
Severity: Major
Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/tooltip/tooltip.js on lines 144..179

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 77.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        else if ('left' == _ol.options.position) {
            _ol.$tooltip.addClass('arrow-right');

            //left
            return {
Severity: Major
Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/tooltip/tooltip.js on lines 171..179

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 76.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        else {
            _ol.$tooltip.addClass('arrow-left');

            //right
            return {
Severity: Major
Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
src/Resources/assets/js/tooltip/tooltip.js on lines 162..170

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 76.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    OlLink.prototype.remove_all = function (e){
        e.preventDefault();
        var _ol = this;

        //iterate on all
Severity: Major
Found in src/Resources/assets/js/link/link.js and 2 other locations - About 1 hr to fix
src/Resources/assets/js/social/social.js on lines 82..88
src/Resources/assets/js/upload/upload.js on lines 138..144

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 72.

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

Further Reading

Severity
Category
Status
Source
Language