Passed
Branch master (7b1276)
by Marcel
06:24
created

SettingDataset   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 77
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getPriority() 0 3 1
A getIdentifier() 0 3 1
A canChangeMail() 0 3 1
A isDefaultEnabledMail() 0 3 1
A isDefaultEnabledStream() 0 3 1
A __construct() 0 3 1
A canChangeStream() 0 3 1
A getName() 0 3 1
1
<?php
2
/**
3
 * Data Analytics
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the LICENSE.md file.
7
 *
8
 * @author Marcel Scherello <[email protected]>
9
 * @copyright 2019 Marcel Scherello
10
 */
11
12
namespace OCA\Analytics\Activity;
13
14
15
use OCP\IL10N;
16
17
class SettingDataset implements \OCP\Activity\ISetting
18
{
19
20
    /** @var IL10N */
21
    protected $l;
22
23
    /**
24
     * @param IL10N $l
25
     */
26
    public function __construct(IL10N $l)
27
    {
28
        $this->l = $l;
29
    }
30
31
    /**
32
     * @return string Lowercase a-z and underscore only identifier
33
     * @since 11.0.0
34
     */
35
    public function getIdentifier()
36
    {
37
        return 'analytics_dataset';
38
    }
39
40
    /**
41
     * @return string A translated string
42
     * @since 11.0.0
43
     */
44
    public function getName()
45
    {
46
        return $this->l->t('<strong>Data Analytics</strong>: New reports');
47
    }
48
49
    /**
50
     * @return int whether the filter should be rather on the top or bottom of
51
     * the admin section. The filters are arranged in ascending order of the
52
     * priority values. It is required to return a value between 0 and 100.
53
     * @since 11.0.0
54
     */
55
    public function getPriority()
56
    {
57
        return 90;
58
    }
59
60
    /**
61
     * @return bool True when the option can be changed for the stream
62
     * @since 11.0.0
63
     */
64
    public function canChangeStream()
65
    {
66
        return true;
67
    }
68
69
    /**
70
     * @return bool True when the option can be changed for the stream
71
     * @since 11.0.0
72
     */
73
    public function isDefaultEnabledStream()
74
    {
75
        return true;
76
    }
77
78
    /**
79
     * @return bool True when the option can be changed for the mail
80
     * @since 11.0.0
81
     */
82
    public function canChangeMail()
83
    {
84
        return true;
85
    }
86
87
    /**
88
     * @return bool True when the option can be changed for the stream
89
     * @since 11.0.0
90
     */
91
    public function isDefaultEnabledMail()
92
    {
93
        return false;
94
    }
95
}