Setting   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 0
dl 0
loc 70
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getIdentifier() 0 3 1
A getName() 0 3 1
A getPriority() 0 3 1
A canChangeStream() 0 3 1
A isDefaultEnabledStream() 0 3 1
A canChangeMail() 0 3 1
A isDefaultEnabledMail() 0 3 1
1
<?php
2
3
namespace OCA\Mood\Activity;
4
5
6
use OCP\Activity\ISetting;
7
use OCP\IL10N;
8
9
class Setting implements ISetting {
10
11
	/** @var IL10N */
12
	protected $l10n;
13
14
	/**
15
	 * @param IL10N $l10n
16
	 */
17
	public function __construct(IL10N $l10n) {
18
		$this->l10n = $l10n;
19
	}
20
21
	/**
22
	 * @return string Lowercase a-z and underscore only identifier
23
	 * @since 11.0.0
24
	 */
25
	public function getIdentifier() {
26
		return 'mood';
27
	}
28
29
	/**
30
	 * @return string A translated string
31
	 * @since 11.0.0
32
	 */
33
	public function getName() {
34
		return $this->l10n->t('A social <strong>mood</strong> is shared');
35
	}
36
37
	/**
38
	 * @return int whether the filter should be rather on the top or bottom of
39
	 * the admin section. The filters are arranged in ascending order of the
40
	 * priority values. It is required to return a value between 0 and 100.
41
	 * @since 11.0.0
42
	 */
43
	public function getPriority() {
44
		return 60;
45
	}
46
47
	/**
48
	 * @return bool True when the option can be changed for the stream
49
	 * @since 11.0.0
50
	 */
51
	public function canChangeStream() {
52
		return true;
53
	}
54
55
	/**
56
	 * @return bool True when the option can be changed for the stream
57
	 * @since 11.0.0
58
	 */
59
	public function isDefaultEnabledStream() {
60
		return true;
61
	}
62
63
	/**
64
	 * @return bool True when the option can be changed for the mail
65
	 * @since 11.0.0
66
	 */
67
	public function canChangeMail() {
68
		return false;
69
	}
70
71
	/**
72
	 * @return bool True when the option can be changed for the stream
73
	 * @since 11.0.0
74
	 */
75
	public function isDefaultEnabledMail() {
76
		return false;
77
	}
78
}
79
80