Resources/public/js/main.js   A
last analyzed

Complexity

Total Complexity 6
Complexity/F 1

Size

Lines of Code 53
Function Count 6

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 6
dl 0
loc 53
rs 10
c 0
b 0
f 0
cc 0
nc 1
mnd 0
bc 6
fnc 6
bpm 1
cpm 1
noi 2

1 Function

Rating   Name   Duplication   Size   Complexity  
B main.js ➔ define 0 40 1
1
require.config({
2
    paths: {
3
        sulucomment: '../../sulucomment/js',
4
        sulucommentcss: '../../sulucomment/css',
5
6
        'services/sulucomment/comment-manager': '../../sulucomment/js/services/comments/manager',
7
        'services/sulucomment/comment-router': '../../sulucomment/js/services/comments/router',
8
9
        'services/sulucomment/thread-manager': '../../sulucomment/js/services/threads/manager',
10
        'services/sulucomment/thread-router': '../../sulucomment/js/services/threads/router'
11
    }
12
});
13
14
define(function() {
15
16
    'use strict';
17
18
    return {
19
20
        name: 'Sulu Comment Bundle',
21
22
        initialize: function(app) {
23
24
            app.components.addSource('sulucomment', '/bundles/sulucomment/js/components');
25
26
            app.sandbox.mvc.routes.push({
27
                route: 'comments',
28
                callback: function() {
29
                    return '<div data-aura-component="comments/list@sulucomment"/>';
30
                }
31
            });
32
            app.sandbox.mvc.routes.push({
33
                route: 'comments/edit::id/:content',
34
                callback: function(id, content) {
0 ignored issues
show
Unused Code introduced by
The parameter content is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
35
                    return '<div data-aura-component="comments/edit@sulucomment" data-aura-id="' + id + '"/>';
36
                }
37
            });
38
39
            app.sandbox.mvc.routes.push({
40
                route: 'threads',
41
                callback: function() {
42
                    return '<div data-aura-component="threads/list@sulucomment"/>';
43
                }
44
            });
45
            app.sandbox.mvc.routes.push({
46
                route: 'threads/edit::id/:content',
47
                callback: function(id, content) {
0 ignored issues
show
Unused Code introduced by
The parameter content is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
48
                    return '<div data-aura-component="threads/edit@sulucomment" data-aura-id="' + id + '"/>';
49
                }
50
            });
51
        }
52
    };
53
});
54