SettingData   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getPriority() 0 3 1
A canChangeMail() 0 3 1
A isDefaultEnabledMail() 0 3 1
A getIdentifier() 0 3 1
A canChangeStream() 0 3 1
A isDefaultEnabledStream() 0 3 1
A __construct() 0 3 1
A getName() 0 3 1
1
<?php
2
/**
3
 * Analytics
4
 *
5
 * SPDX-FileCopyrightText: 2019-2022 Marcel Scherello
6
 * SPDX-License-Identifier: AGPL-3.0-or-later
7
 */
8
9
namespace OCA\Analytics\Activity;
10
11
12
use OCP\IL10N;
0 ignored issues
show
Bug introduced by
The type OCP\IL10N was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
class SettingData implements \OCP\Activity\ISetting
0 ignored issues
show
Bug introduced by
The type OCP\Activity\ISetting was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
{
16
17
    /** @var IL10N */
18
    protected $l;
19
20
    /**
21
     * @param IL10N $l
22
     */
23
    public function __construct(IL10N $l)
24
    {
25
        $this->l = $l;
26
    }
27
28
    /**
29
     * @return string Lowercase a-z and underscore only identifier
30
     * @since 11.0.0
31
     */
32
    public function getIdentifier()
33
    {
34
        return 'analytics_data';
35
    }
36
37
    /**
38
     * @return string A translated string
39
     * @since 11.0.0
40
     */
41
    public function getName()
42
    {
43
        return $this->l->t('<strong>Analytics</strong>: New data was added to a report');
44
    }
45
46
    /**
47
     * @return int whether the filter should be rather on the top or bottom of
48
     * the admin section. The filters are arranged in ascending order of the
49
     * priority values. It is required to return a value between 0 and 100.
50
     * @since 11.0.0
51
     */
52
    public function getPriority()
53
    {
54
        return 90;
55
    }
56
57
    /**
58
     * @return bool True when the option can be changed for the stream
59
     * @since 11.0.0
60
     */
61
    public function canChangeStream()
62
    {
63
        return true;
64
    }
65
66
    /**
67
     * @return bool True when the option can be changed for the stream
68
     * @since 11.0.0
69
     */
70
    public function isDefaultEnabledStream()
71
    {
72
        return false;
73
    }
74
75
    /**
76
     * @return bool True when the option can be changed for the mail
77
     * @since 11.0.0
78
     */
79
    public function canChangeMail()
80
    {
81
        return true;
82
    }
83
84
    /**
85
     * @return bool True when the option can be changed for the stream
86
     * @since 11.0.0
87
     */
88
    public function isDefaultEnabledMail()
89
    {
90
        return false;
91
    }
92
}