com.github.netkorp.telegram.framework.properties.CommandProperties   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNonSecure() 0 2 1
A setNonSecure(List) 0 2 1
1
package com.github.netkorp.telegram.framework.properties;
0 ignored issues
show
Code Smell introduced by
It is a best practice to supply a copyright/licence header in your code. Your organisation probably has a template for that.
Loading history...
2
3
import org.springframework.boot.context.properties.ConfigurationProperties;
4
import org.springframework.stereotype.Component;
5
6
import java.util.List;
7
8
/**
9
 * Contains the properties associated to the commands.
10
 */
11
@Component
12
@ConfigurationProperties("telegram.commands")
13
public class CommandProperties {
0 ignored issues
show
Coding Style introduced by
Move this left curly brace to the beginning of next line of code.
Loading history...
introduced by
Add a constructor to the class.
Loading history...
14
15
    /**
16
     * List with the names of non-secure commands.
17
     */
18
    private List<String> nonSecure;
0 ignored issues
show
Coding Style introduced by
Make this line start at column 3.
Loading history...
19
20
    /**
21
     * Returns the list with the names of non-secure commands.
22
     *
23
     * @return the list with the names of non-secure commands.
24
     */
25
    public List<String> getNonSecure() {
0 ignored issues
show
Coding Style introduced by
Move this left curly brace to the beginning of next line of code.
Loading history...
26
        return nonSecure;
0 ignored issues
show
Coding Style introduced by
Make this line start at column 5.
Loading history...
Security Comprehensibility introduced by
Mutable class members should never be returned to a caller or accepted and stored directly. You might want to Return a copy of nonSecure instead.
Loading history...
27
    }
28
29
    /**
30
     * Sets the names of non-secure commands.
31
     *
32
     * @param nonSecure the names of non-secure commands.
33
     */
34
    public void setNonSecure(List<String> nonSecure) {
0 ignored issues
show
Coding Style introduced by
Move this left curly brace to the beginning of next line of code.
Loading history...
35
        this.nonSecure = nonSecure;
0 ignored issues
show
Coding Style introduced by
Make this line start at column 5.
Loading history...
Security Comprehensibility introduced by
Mutable class members should never be returned to a caller or accepted and stored directly. You might want to Store a copy of nonSecure instead.
Loading history...
36
    }
37
}
38