Passed
Push — master ( 38fb8e...f6b156 )
by Andreas
24:23
created

static/org.openpsa.calendar/fullcalendar-4.4.0/core/locales/fr-ca.js   A

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 27
Function Count 2

Duplication

Duplicated Lines 5
Ratio 18.52 %

Importance

Changes 0
Metric Value
eloc 21
dl 5
loc 27
rs 10
c 0
b 0
f 0
wmc 4
mnd 2
bc 2
fnc 2
bpm 1
cpm 2
noi 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 View Code Duplication
(function (global, factory) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
    typeof define === 'function' && define.amd ? define(factory) :
4
    (global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['fr-ca'] = factory()));
0 ignored issues
show
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Best Practice introduced by
If you intend to check if the variable self is declared in the current environment, consider using typeof self === "undefined" instead. This is safe if the variable is not actually declared.
Loading history...
5
}(this, function () { 'use strict';
6
7
    var frCa = {
8
        code: "fr",
9
        buttonText: {
10
            prev: "Précédent",
11
            next: "Suivant",
12
            today: "Aujourd'hui",
13
            year: "Année",
14
            month: "Mois",
15
            week: "Semaine",
16
            day: "Jour",
17
            list: "Mon planning"
18
        },
19
        weekLabel: "Sem.",
20
        allDayHtml: "Toute la<br/>journée",
21
        eventLimitText: "en plus",
22
        noEventsMessage: "Aucun événement à afficher"
23
    };
24
25
    return frCa;
26
27
}));
28