Showing 282 of 282 total issues

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

export default class IFilmLayout {

    // Static Constructor
    public static init(config, appData, LayoutInstance: Layouts): void {

Severity: Major
Found in src/app/layouts/ifilm.layout.ts and 2 other locations - About 6 days to fix
src/app/layouts/iktv.layout.ts on lines 6..126
src/app/layouts/uhd.layout.ts on lines 6..124

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

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

export default class UHDLayout {

    // Static Constructor
    public static init(config, appData, LayoutInstance: Layouts): void {

Severity: Major
Found in src/app/layouts/uhd.layout.ts and 2 other locations - About 6 days to fix
src/app/layouts/ifilm.layout.ts on lines 6..126
src/app/layouts/iktv.layout.ts on lines 6..126

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

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

export default class IKTVLayout {

    // Static Constructor
    public static init(config, appData, LayoutInstance: Layouts): void {

Severity: Major
Found in src/app/layouts/iktv.layout.ts and 2 other locations - About 6 days to fix
src/app/layouts/ifilm.layout.ts on lines 6..126
src/app/layouts/uhd.layout.ts on lines 6..124

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

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

File main.js has 1639 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!function (t) {
    var e = {};

    function n(i) {
        if (e[i]) return e[i].exports;
Severity: Major
Found in src/assets/js/games/tower/main.js - About 4 days to fix

    File blockrain.jquery.js has 1258 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * BlockRain.js 0.2.0
     * jQuery plugin that lets you put a playable (and configurable) game of Tetris in your site or just leave it in auto in the background.
     * http://aerolab.github.io/blockrain.js/
     *
    Severity: Major
    Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 3 days to fix

      Function n has 493 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  var e, n = function () {
                      var e, n, i, r, a, o = [], s = o.concat, u = o.filter, c = o.slice, l = document, h = {}, f = {}, d = {"column-count": 1, columns: 1, "font-weight": 1, "line-height": 1, opacity: 1, "z-index": 1, zoom: 1},
                          p = /^\s*<(\w+|!)[^>]*>/, g = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, v = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, m = /^(?:body|html)$/i, y = /([A-Z])/g,
                          b = ["val", "css", "html", "text", "data", "width", "height", "offset"], E = l.createElement("table"), x = l.createElement("tr"),
                          T = {tr: l.createElement("tbody"), tbody: E, thead: E, tfoot: E, td: x, th: x, "*": l.createElement("div")}, O = /complete|loaded|interactive/, w = /^[\w-]*$/, A = {}, _ = A.toString, k = {}, M = l.createElement("div"),
      Severity: Major
      Found in src/assets/js/games/tower/main.js - About 2 days to fix

        Function E has 333 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var m = l, y = u, b = c, E = function () {
                function t() {
                    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
                    if (g(this, t), document.createElement("canvas").getContext) {
                        var n = e.canvasId, r = e.debug, a = e.width, o = e.height, s = e.highResolution, u = e.loadLimit, c = e.soundOn, l = a || window.innerWidth, h = o || window.innerHeight;
        Severity: Major
        Found in src/assets/js/games/tower/main.js - About 1 day to fix

          Function _SetupBoard has 274 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _SetupBoard: function() {
          
                var game = this;
                var info = this._info;
          
          
          Severity: Major
          Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 1 day to fix

            File template7.js has 592 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * Template7 1.4.1
             * Mobile-first HTML template engine
             * 
             * http://www.idangero.us/template7/
            Severity: Major
            Found in src/_helpers/template7.js - About 1 day to fix

              File developer.ts has 480 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import * as $ from 'jquery';
              
              /**
               * Developer tools, press 0 (by default) key four times to display developer tools
               * You can see console logs in special layer in the app.
              Severity: Minor
              Found in src/_helpers/developer.ts - About 7 hrs to fix

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

                    registerEvents() {
                        const self = this;
                        const $locationSelect = $('#location-select');
                        this.registerKeyboardInputs($locationSelect);
                        $locationSelect.on('change', function (e) {
                Severity: Major
                Found in src/modules/weather/weather.module.ts and 1 other location - About 6 hrs to fix
                src/modules/prayer-times/prayer-times.module.ts on lines 40..54

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

                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

                    private registerEvents(): void {
                        const self = this;
                        const $locationSelect = $('#location-select');
                        this.registerKeyboardInputs($locationSelect);
                        $locationSelect.on('change', function (e) {
                Severity: Major
                Found in src/modules/prayer-times/prayer-times.module.ts and 1 other location - About 6 hrs to fix
                src/modules/weather/weather.module.ts on lines 86..100

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

                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

                    private initializeNewsCategoriesSlider(): void {
                        const self = this;
                        const $el = $("ul.news-categories");
                        const slidesToShow = 3;
                        if (!$el.is(':visible'))
                Severity: Major
                Found in src/modules/news-sections/news-sections.module.ts and 1 other location - About 6 hrs to fix
                src/modules/program/program.module.ts on lines 49..68

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

                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

                    private initializeSlider(): void {
                        const self = this;
                        const $el = $("ul.program-items");
                        const slidesToShow = 3;
                        if (!$el.is(':visible'))
                Severity: Major
                Found in src/modules/program/program.module.ts and 1 other location - About 6 hrs to fix
                src/modules/news-sections/news-sections.module.ts on lines 72..91

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

                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

                Function addHandlebarsHelpers has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function addHandlebarsHelpers(context): void {
                    Handlebars.registerHelper("math", function (lvalue, operator, rvalue, options) {
                        lvalue = parseFloat(lvalue);
                        rvalue = parseFloat(rvalue);
                
                
                Severity: Major
                Found in src/_helpers/handlebar.helper.ts - About 5 hrs to fix

                  Function _SetupShapeFactory has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _SetupShapeFactory: function(){
                        var game = this;
                        if( this._shapeFactory !== null ){ return; }
                  
                  
                  
                  Severity: Major
                  Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 5 hrs to fix

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

                        private playVideo(): void {
                            const self = this;
                            if (this.templateHelper.hasClass('player-mode'))
                                return;
                            const $newsDetails = $('.news-details');
                    Severity: Major
                    Found in src/modules/news/news.module.ts and 1 other location - About 5 hrs to fix
                    src/modules/news-sections/news-sections.module.ts on lines 250..266

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

                    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

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

                        private playVideo(): void {
                            const self = this;
                            if (this.templateHelper.hasClass('player-mode'))
                                return;
                            const $newsDetails = $('.news-details');
                    Severity: Major
                    Found in src/modules/news-sections/news-sections.module.ts and 1 other location - About 5 hrs to fix
                    src/modules/news/news.module.ts on lines 187..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 146.

                    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( typeof game._theme.secondary === 'string' && game._theme.secondary !== '' ) {
                                  return game._theme.secondary;
                                } else if( typeof game._theme.blocks !== 'undefined' && game._theme.blocks !== null ) {
                                  return getBlockVariation(game._theme.blocks[blockType], blockVariation);
                    Severity: Major
                    Found in src/assets/js/games/blockrain/blockrain.jquery.js and 1 other location - About 4 hrs to fix
                    src/assets/js/games/blockrain/blockrain.jquery.js on lines 1100..1108

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

                    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( falling ) {
                                if( typeof game._theme.primary === 'string' && game._theme.primary !== '' ) {
                                  return game._theme.primary;
                                } else if( typeof game._theme.blocks !== 'undefined' && game._theme.blocks !== null ) {
                                  return getBlockVariation(game._theme.blocks[blockType], blockVariation);
                    Severity: Major
                    Found in src/assets/js/games/blockrain/blockrain.jquery.js and 1 other location - About 4 hrs to fix
                    src/assets/js/games/blockrain/blockrain.jquery.js on lines 1108..1116

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

                    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